|
@@ -1,4 +1,4 @@
|
|
|
-From 2c0ab405ba4508f1ef216475a9c0615f074af32b Mon Sep 17 00:00:00 2001
|
|
|
+From e10c189c924a7e17c8aecca39ab4d09ef6fe2cac Mon Sep 17 00:00:00 2001
|
|
|
From: Chuhong Yuan <hslester96@gmail.com>
|
|
|
Date: Wed, 24 Jul 2019 19:27:45 +0800
|
|
|
Subject: [PATCH] mwifiex: pcie: Use dev_get_drvdata
|
|
@@ -49,7 +49,7 @@ index 5907b34037c2..4e655038e3f3 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 446330f970e8e493a88b4796f37006b90492be7b Mon Sep 17 00:00:00 2001
|
|
|
+From ec0b61c1ad314f1a15602c518b3e0922053c2d72 Mon Sep 17 00:00:00 2001
|
|
|
From: Tsuchiya Yuto <kitakar@gmail.com>
|
|
|
Date: Mon, 28 Sep 2020 17:46:49 +0900
|
|
|
Subject: [PATCH] mwifiex: pcie: add DMI-based quirk impl for Surface devices
|
|
@@ -257,7 +257,7 @@ index 000000000000..5326ae7e5671
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 1a6273b1e8c7323771b0fd6c7ce17ab84a6f01b3 Mon Sep 17 00:00:00 2001
|
|
|
+From 1bff7cf754d8a594355169b042c2deb16d77d20b Mon Sep 17 00:00:00 2001
|
|
|
From: Tsuchiya Yuto <kitakar@gmail.com>
|
|
|
Date: Tue, 29 Sep 2020 17:25:22 +0900
|
|
|
Subject: [PATCH] mwifiex: pcie: add reset_d3cold quirk for Surface gen4+
|
|
@@ -458,7 +458,7 @@ index 5326ae7e5671..8b9dcb5070d8 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 8bda66c2f6ff1998fb1a74acb059f566cd58f690 Mon Sep 17 00:00:00 2001
|
|
|
+From 19c52e3d0bd6314e463489777cc8bfe737bb3044 Mon Sep 17 00:00:00 2001
|
|
|
From: Tsuchiya Yuto <kitakar@gmail.com>
|
|
|
Date: Tue, 29 Sep 2020 17:32:22 +0900
|
|
|
Subject: [PATCH] mwifiex: pcie: add reset_wsid quirk for Surface 3
|
|
@@ -637,7 +637,7 @@ index 8b9dcb5070d8..3ef7440418e3 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From d1453d41ff808912f99d999f9a6b800b5323f9ed Mon Sep 17 00:00:00 2001
|
|
|
+From 8359f0a43399b61943e9020b868cfcd471a01bdd Mon Sep 17 00:00:00 2001
|
|
|
From: Tsuchiya Yuto <kitakar@gmail.com>
|
|
|
Date: Wed, 30 Sep 2020 18:08:24 +0900
|
|
|
Subject: [PATCH] mwifiex: pcie: (OEMB) add quirk for Surface 3 with broken DMI
|
|
@@ -699,7 +699,7 @@ index f0a6fa0a7ae5..34dcd84f02a6 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From dcc6b7e694cf40fd21288ac280a8c616246c9220 Mon Sep 17 00:00:00 2001
|
|
|
+From b5d76682fcd86231e47bb0275ac668a12c6f920f Mon Sep 17 00:00:00 2001
|
|
|
From: Tsuchiya Yuto <kitakar@gmail.com>
|
|
|
Date: Sun, 4 Oct 2020 00:11:49 +0900
|
|
|
Subject: [PATCH] mwifiex: pcie: disable bridge_d3 for Surface gen4+
|
|
@@ -854,7 +854,7 @@ index 3ef7440418e3..a95ebac06e13 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From df0fb030a3b43803dfb51a7d66b9727455c5e963 Mon Sep 17 00:00:00 2001
|
|
|
+From e59f0ea01b0bdd349574e28f82b6f50ba8756354 Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Tue, 10 Nov 2020 12:49:56 +0100
|
|
|
Subject: [PATCH] mwifiex: Use non-posted PCI register writes
|
|
@@ -911,7 +911,7 @@ index d0e002cfc295..aae276fc1155 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 641787d4ff598a11ffdb444a55ecb0db206d2bae Mon Sep 17 00:00:00 2001
|
|
|
+From 1e06ac629459d93f07faac0cd3181731f5f80f7a Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Tue, 3 Nov 2020 13:28:04 +0100
|
|
|
Subject: [PATCH] mwifiex: Add quirk resetting the PCI bridge on MS Surface
|
|
@@ -1078,7 +1078,7 @@ index a95ebac06e13..4ec2ae72f632 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 8a4ae1e71caaa86b3b3cb2317554babbc992addf Mon Sep 17 00:00:00 2001
|
|
|
+From 29c515485af77326c8133fe66c62fd73c584f007 Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Sun, 28 Mar 2021 21:10:06 +0200
|
|
|
Subject: [PATCH] mwifiex: Try waking the firmware until we get an interrupt
|
|
@@ -1167,7 +1167,7 @@ index 6b06f2a76cdc..45dc0bfe26ba 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 9c2e97d2604d8784c97f143a0764835278cf230e Mon Sep 17 00:00:00 2001
|
|
|
+From 13ec36095733c9b4e3491eb639d11a3cd96cd09b Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Thu, 25 Mar 2021 11:33:02 +0100
|
|
|
Subject: [PATCH] Bluetooth: btusb: Lower passive lescan interval on Marvell
|
|
@@ -1245,7 +1245,7 @@ index 1b0adf5c2376..283a90928f0e 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 344a1dcf42ef6b7257114dd27ff2c509e8c58f38 Mon Sep 17 00:00:00 2001
|
|
|
+From 1ab54f8aaa85597e14e6c8783ac27da752504ffb Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Wed, 11 Nov 2020 12:31:26 +0100
|
|
|
Subject: [PATCH] mwifiex: Small cleanup for handling virtual interface type
|
|
@@ -1346,7 +1346,7 @@ index 650191db25cb..5badf7fef37e 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 9ce293468a22681f041f4cb4d8e586c69dac73ef Mon Sep 17 00:00:00 2001
|
|
|
+From 512cb7da6756d971812dbc927f700d7f00beae1f Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Wed, 11 Nov 2020 12:44:39 +0100
|
|
|
Subject: [PATCH] mwifiex: Use function to check whether interface type change
|
|
@@ -1579,7 +1579,7 @@ index 5badf7fef37e..e73334679992 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From c14b9f7281fab79719aa87588b0b4a4177436d73 Mon Sep 17 00:00:00 2001
|
|
|
+From 89b509e851c8c4ed7e908da6c83dbb8728db39b6 Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Wed, 11 Nov 2020 13:33:04 +0100
|
|
|
Subject: [PATCH] mwifiex: Run SET_BSS_MODE when changing from P2P to STATION
|
|
@@ -1647,7 +1647,7 @@ index e73334679992..99da637692cc 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 1a64da873c980ba44b7912c7a029849b7e36b896 Mon Sep 17 00:00:00 2001
|
|
|
+From d73c923b020030f924e9ace0a9cae681d3c697f3 Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Wed, 11 Nov 2020 14:42:54 +0100
|
|
|
Subject: [PATCH] mwifiex: Use helper function for counting interface types
|
|
@@ -1823,7 +1823,7 @@ index 99da637692cc..feb3a858d8c1 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 28a97a34b6b399435390208af5b9feaf53c82b32 Mon Sep 17 00:00:00 2001
|
|
|
+From 8c97fa4be0ccb94ca11f51b31d8c7831344664cc Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Fri, 26 Mar 2021 15:56:58 +0100
|
|
|
Subject: [PATCH] mwifiex: Update virtual interface counters right after
|
|
@@ -1926,7 +1926,7 @@ index feb3a858d8c1..54d9e789aa14 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 22d207561facfabf24fe2730dbfeef6054ad68a9 Mon Sep 17 00:00:00 2001
|
|
|
+From aca2858e16b653898a6d8e48369a5007f423cefb Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Wed, 11 Nov 2020 13:42:40 +0100
|
|
|
Subject: [PATCH] mwifiex: Allow switching interface type from P2P_CLIENT to
|
|
@@ -2015,7 +2015,7 @@ index 54d9e789aa14..ec5ed00b4b89 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From e59c6ded774773fc82dd8e72563bdd8aacea9903 Mon Sep 17 00:00:00 2001
|
|
|
+From f691465e501cc8f33040b66756008f4cd387877e Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Fri, 26 Mar 2021 15:31:08 +0100
|
|
|
Subject: [PATCH] mwifiex: Handle interface type changes from AP to STATION
|
|
@@ -2042,7 +2042,7 @@ index ec5ed00b4b89..0fc554abfea3 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From e589acbb316c3d22fe92b879894f4373336dae24 Mon Sep 17 00:00:00 2001
|
|
|
+From 8c038b668306afa9a5708a96cf34fdbade785d40 Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Fri, 26 Mar 2021 15:32:16 +0100
|
|
|
Subject: [PATCH] mwifiex: Properly initialize private structure on interface
|
|
@@ -2097,7 +2097,7 @@ index 0fc554abfea3..7c6d31eb058c 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 92509b4c26503824665928fd299bfb7153c3cfdf Mon Sep 17 00:00:00 2001
|
|
|
+From 427ed42bb4a82f036d71601b60a830435b860ce7 Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
Date: Sat, 27 Mar 2021 12:19:14 +0100
|
|
|
Subject: [PATCH] mwifiex: Fix copy-paste mistake when creating virtual
|
|
@@ -2129,3 +2129,443 @@ index 7c6d31eb058c..16a94f06a518 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
+From 67bb17da07e50c8819e31cb66a879f6881340b3b Mon Sep 17 00:00:00 2001
|
|
|
+From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
+Date: Tue, 13 Apr 2021 14:30:28 +0200
|
|
|
+Subject: [PATCH] mwifiex: Deactive host sleep using HSCFG after it was
|
|
|
+ activated manually
|
|
|
+
|
|
|
+When powersaving (so either wifi powersaving or deep sleep, depending on
|
|
|
+which state the firmware is in) is disabled, the way the firmware goes
|
|
|
+into host sleep is different: Usually the firmware implicitely enters
|
|
|
+host sleep on the next SLEEP event we get when we configured host sleep
|
|
|
+via HSCFG before. When powersaving is disabled though, there are no
|
|
|
+SLEEP events, the way we enter host sleep in that case is different: The
|
|
|
+firmware will send us a HS_ACT_REQ event and after that we "manually"
|
|
|
+make the firmware enter host sleep by sending it another HSCFG command
|
|
|
+with the action HS_ACTIVATE.
|
|
|
+
|
|
|
+Now waking up from host sleep appears to be different depending on
|
|
|
+whether powersaving is enabled again: When powersaving is enabled, the
|
|
|
+firmware implicitely leaves host sleep as soon as it wakes up and sends
|
|
|
+us an AWAKE event. When powersaving is disabled though, it apparently
|
|
|
+doesn't implicitely leave host sleep, but instead we need to send it a
|
|
|
+HSCFG command with the HS_CONFIGURE action and the HS_CFG_CANCEL
|
|
|
+condition. We didn't do that so far, which is why waking up from host
|
|
|
+sleep was broken when powersaving is disabled.
|
|
|
+
|
|
|
+So add some additional state to mwifiex_adapter where we keep track of
|
|
|
+whether host sleep was activated manually via HS_ACTIVATE, and if that
|
|
|
+was the case, deactivate it manually again via HS_CFG_CANCEL.
|
|
|
+
|
|
|
+Patchset: wifi
|
|
|
+---
|
|
|
+ drivers/net/wireless/marvell/mwifiex/cmdevt.c | 21 +++++++++++++++++++
|
|
|
+ drivers/net/wireless/marvell/mwifiex/main.c | 18 ++++++++++++++++
|
|
|
+ drivers/net/wireless/marvell/mwifiex/main.h | 1 +
|
|
|
+ .../net/wireless/marvell/mwifiex/sta_cmd.c | 4 ++++
|
|
|
+ 4 files changed, 44 insertions(+)
|
|
|
+
|
|
|
+diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
|
|
+index 60db2b969e20..c7db969aa11d 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
|
|
+@@ -604,6 +604,11 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+
|
|
|
++ if (priv->adapter->hs_activated_manually &&
|
|
|
++ cmd_no != HostCmd_CMD_802_11_HS_CFG_ENH) {
|
|
|
++ mwifiex_cancel_hs(priv, MWIFIEX_ASYNC_CMD);
|
|
|
++ priv->adapter->hs_activated_manually = false;
|
|
|
++ }
|
|
|
+
|
|
|
+ /* Get a new command node */
|
|
|
+ cmd_node = mwifiex_get_cmd_node(adapter);
|
|
|
+@@ -711,6 +716,15 @@ mwifiex_insert_cmd_to_pending_q(struct mwifiex_adapter *adapter,
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
++ /* Same with exit host sleep cmd, luckily that can't happen at the same time as EXIT_PS */
|
|
|
++ if (command == HostCmd_CMD_802_11_HS_CFG_ENH) {
|
|
|
++ struct host_cmd_ds_802_11_hs_cfg_enh *hs_cfg =
|
|
|
++ &host_cmd->params.opt_hs_cfg;
|
|
|
++
|
|
|
++ if (le16_to_cpu(hs_cfg->action) == HS_ACTIVATE)
|
|
|
++ add_tail = false;
|
|
|
++ }
|
|
|
++
|
|
|
+ spin_lock_irqsave(&adapter->cmd_pending_q_lock, flags);
|
|
|
+ if (add_tail)
|
|
|
+ list_add_tail(&cmd_node->list, &adapter->cmd_pending_q);
|
|
|
+@@ -1215,6 +1229,13 @@ mwifiex_process_hs_config(struct mwifiex_adapter *adapter)
|
|
|
+ __func__);
|
|
|
+
|
|
|
+ adapter->if_ops.wakeup(adapter);
|
|
|
++
|
|
|
++ if (adapter->hs_activated_manually) {
|
|
|
++ mwifiex_cancel_hs(mwifiex_get_priv (adapter, MWIFIEX_BSS_ROLE_ANY),
|
|
|
++ MWIFIEX_ASYNC_CMD);
|
|
|
++ adapter->hs_activated_manually = false;
|
|
|
++ }
|
|
|
++
|
|
|
+ adapter->hs_activated = false;
|
|
|
+ clear_bit(MWIFIEX_IS_HS_CONFIGURED, &adapter->work_flags);
|
|
|
+ clear_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags);
|
|
|
+diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
|
|
|
+index ceac611ef086..fd55f502dd2e 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/main.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/main.c
|
|
|
+@@ -402,6 +402,12 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
|
|
|
+ !adapter->scan_processing) &&
|
|
|
+ !adapter->data_sent &&
|
|
|
+ !skb_queue_empty(&adapter->tx_data_q)) {
|
|
|
++ if (adapter->hs_activated_manually) {
|
|
|
++ mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY),
|
|
|
++ MWIFIEX_ASYNC_CMD);
|
|
|
++ adapter->hs_activated_manually = false;
|
|
|
++ }
|
|
|
++
|
|
|
+ mwifiex_process_tx_queue(adapter);
|
|
|
+ if (adapter->hs_activated) {
|
|
|
+ clear_bit(MWIFIEX_IS_HS_CONFIGURED,
|
|
|
+@@ -419,6 +425,12 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
|
|
|
+ !mwifiex_bypass_txlist_empty(adapter) &&
|
|
|
+ !mwifiex_is_tdls_chan_switching
|
|
|
+ (mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA))) {
|
|
|
++ if (adapter->hs_activated_manually) {
|
|
|
++ mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY),
|
|
|
++ MWIFIEX_ASYNC_CMD);
|
|
|
++ adapter->hs_activated_manually = false;
|
|
|
++ }
|
|
|
++
|
|
|
+ mwifiex_process_bypass_tx(adapter);
|
|
|
+ if (adapter->hs_activated) {
|
|
|
+ clear_bit(MWIFIEX_IS_HS_CONFIGURED,
|
|
|
+@@ -435,6 +447,12 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
|
|
|
+ !adapter->data_sent && !mwifiex_wmm_lists_empty(adapter) &&
|
|
|
+ !mwifiex_is_tdls_chan_switching
|
|
|
+ (mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA))) {
|
|
|
++ if (adapter->hs_activated_manually) {
|
|
|
++ mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY),
|
|
|
++ MWIFIEX_ASYNC_CMD);
|
|
|
++ adapter->hs_activated_manually = false;
|
|
|
++ }
|
|
|
++
|
|
|
+ mwifiex_wmm_process_tx(adapter);
|
|
|
+ if (adapter->hs_activated) {
|
|
|
+ clear_bit(MWIFIEX_IS_HS_CONFIGURED,
|
|
|
+diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
|
|
|
+index 7e526014b638..96395854c085 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
|
|
+@@ -986,6 +986,7 @@ struct mwifiex_adapter {
|
|
|
+ struct timer_list wakeup_timer;
|
|
|
+ struct mwifiex_hs_config_param hs_cfg;
|
|
|
+ u8 hs_activated;
|
|
|
++ u8 hs_activated_manually;
|
|
|
+ u16 hs_activate_wait_q_woken;
|
|
|
+ wait_queue_head_t hs_activate_wait_q;
|
|
|
+ u8 event_body[MAX_EVENT_SIZE];
|
|
|
+diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
|
|
|
+index 4ed10cf82f9a..057c810a9ef7 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
|
|
|
+@@ -396,6 +396,10 @@ mwifiex_cmd_802_11_hs_cfg(struct mwifiex_private *priv,
|
|
|
+ if (hs_activate) {
|
|
|
+ hs_cfg->action = cpu_to_le16(HS_ACTIVATE);
|
|
|
+ hs_cfg->params.hs_activate.resp_ctrl = cpu_to_le16(RESP_NEEDED);
|
|
|
++
|
|
|
++ adapter->hs_activated_manually = true;
|
|
|
++ mwifiex_dbg(priv->adapter, CMD,
|
|
|
++ "cmd: Activating host sleep manually\n");
|
|
|
+ } else {
|
|
|
+ hs_cfg->action = cpu_to_le16(HS_CONFIGURE);
|
|
|
+ hs_cfg->params.hs_config.conditions = hscfg_param->conditions;
|
|
|
+--
|
|
|
+2.31.1
|
|
|
+
|
|
|
+From 85532e1cc361d5a003fc7eb934268f95a824786e Mon Sep 17 00:00:00 2001
|
|
|
+From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
+Date: Tue, 13 Apr 2021 14:23:05 +0200
|
|
|
+Subject: [PATCH] mwifiex: Add quirk to disable deep sleep with certain
|
|
|
+ hardware revision
|
|
|
+
|
|
|
+The 88W8897 pcie card with the hardware revision 20 apparently has a
|
|
|
+hardware issue where the card wakes up from deep sleep randomly and very
|
|
|
+often, somewhat depending on the card activity, maybe the hardware has a
|
|
|
+floating wakeup pin or something.
|
|
|
+
|
|
|
+Those continuous wakeups prevent the card from entering host sleep when
|
|
|
+the computer suspends. And because the host won't answer to events from
|
|
|
+the card anymore while it's suspended, the firmwares internal
|
|
|
+powersaving state machine seems to get confused and the card can't sleep
|
|
|
+anymore at all after that.
|
|
|
+
|
|
|
+Since we can't work around that hardware bug in the firmware, let's
|
|
|
+get the hardware revision string from the firmware and match it with
|
|
|
+known bad revisions. Then disable auto deep sleep for those revisions,
|
|
|
+which makes sure we no longer get those spurious wakeups.
|
|
|
+
|
|
|
+Patchset: wifi
|
|
|
+---
|
|
|
+ drivers/net/wireless/marvell/mwifiex/main.c | 14 ++++++++++++++
|
|
|
+ drivers/net/wireless/marvell/mwifiex/main.h | 1 +
|
|
|
+ .../net/wireless/marvell/mwifiex/sta_cmdresp.c | 16 ++++++++++++++++
|
|
|
+ 3 files changed, 31 insertions(+)
|
|
|
+
|
|
|
+diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
|
|
|
+index fd55f502dd2e..7159033fcc2e 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/main.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/main.c
|
|
|
+@@ -227,6 +227,19 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
++static void maybe_quirk_fw_disable_ds(struct mwifiex_adapter *adapter)
|
|
|
++{
|
|
|
++ struct mwifiex_private *priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA);
|
|
|
++ struct mwifiex_ver_ext ver_ext;
|
|
|
++
|
|
|
++ set_bit(MWIFIEX_IS_REQUESTING_FW_VEREXT, &adapter->work_flags);
|
|
|
++
|
|
|
++ memset(&ver_ext, 0, sizeof(ver_ext));
|
|
|
++ ver_ext.version_str_sel = 1;
|
|
|
++ mwifiex_send_cmd(priv, HostCmd_CMD_VERSION_EXT,
|
|
|
++ HostCmd_ACT_GEN_GET, 0, &ver_ext, false);
|
|
|
++}
|
|
|
++
|
|
|
+ /*
|
|
|
+ * The main process.
|
|
|
+ *
|
|
|
+@@ -357,6 +370,7 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
|
|
|
+ if (adapter->hw_status == MWIFIEX_HW_STATUS_INIT_DONE) {
|
|
|
+ adapter->hw_status = MWIFIEX_HW_STATUS_READY;
|
|
|
+ mwifiex_init_fw_complete(adapter);
|
|
|
++ maybe_quirk_fw_disable_ds(adapter);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
|
|
|
+index 96395854c085..fa84258f042a 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
|
|
+@@ -524,6 +524,7 @@ enum mwifiex_adapter_work_flags {
|
|
|
+ MWIFIEX_IS_SUSPENDED,
|
|
|
+ MWIFIEX_IS_HS_CONFIGURED,
|
|
|
+ MWIFIEX_IS_HS_ENABLING,
|
|
|
++ MWIFIEX_IS_REQUESTING_FW_VEREXT,
|
|
|
+ };
|
|
|
+
|
|
|
+ struct mwifiex_band_config {
|
|
|
+diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
|
|
+index 7003767eef42..3079ca3e3fdc 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
|
|
+@@ -708,6 +708,22 @@ static int mwifiex_ret_ver_ext(struct mwifiex_private *priv,
|
|
|
+ {
|
|
|
+ struct host_cmd_ds_version_ext *ver_ext = &resp->params.verext;
|
|
|
+
|
|
|
++ if (test_and_clear_bit(MWIFIEX_IS_REQUESTING_FW_VEREXT, &priv->adapter->work_flags)) {
|
|
|
++ if (strncmp(ver_ext->version_str, "ChipRev:20, BB:9b(10.00), RF:40(21)", 128) == 0) {
|
|
|
++ struct mwifiex_ds_auto_ds auto_ds = {
|
|
|
++ .auto_ds = DEEP_SLEEP_OFF,
|
|
|
++ };
|
|
|
++
|
|
|
++ mwifiex_dbg(priv->adapter, MSG,
|
|
|
++ "Bad HW revision detected, disabling deep sleep\n");
|
|
|
++
|
|
|
++ mwifiex_send_cmd(priv, HostCmd_CMD_802_11_PS_MODE_ENH,
|
|
|
++ DIS_AUTO_PS, BITMAP_AUTO_DS, &auto_ds, false);
|
|
|
++ }
|
|
|
++
|
|
|
++ return 0;
|
|
|
++ }
|
|
|
++
|
|
|
+ if (version_ext) {
|
|
|
+ version_ext->version_str_sel = ver_ext->version_str_sel;
|
|
|
+ memcpy(version_ext->version_str, ver_ext->version_str,
|
|
|
+--
|
|
|
+2.31.1
|
|
|
+
|
|
|
+From 41fb0fbc01a1a6b63593f966640df0c88015e974 Mon Sep 17 00:00:00 2001
|
|
|
+From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
+Date: Wed, 11 Nov 2020 15:17:07 +0100
|
|
|
+Subject: [PATCH] mwifiex: Don't log error on suspend if wake-on-wlan is
|
|
|
+ disabled
|
|
|
+
|
|
|
+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.
|
|
|
+
|
|
|
+Patchset: wifi
|
|
|
+---
|
|
|
+ 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 16a94f06a518..92d5c9aa5ec7 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
|
|
+@@ -3457,7 +3457,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
|
|
|
+
|
|
|
+From 142526e86b5ed0b763d9aec1057cad9ca1d795e7 Mon Sep 17 00:00:00 2001
|
|
|
+From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
+Date: Sun, 28 Mar 2021 21:42:54 +0200
|
|
|
+Subject: [PATCH] mwifiex: Log an error on command failure during key-material
|
|
|
+ upload
|
|
|
+
|
|
|
+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.
|
|
|
+
|
|
|
+Patchset: wifi
|
|
|
+---
|
|
|
+ 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 92d5c9aa5ec7..5786dcea79cc 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
|
|
+@@ -523,8 +523,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
|
|
|
+
|
|
|
+From bd0c5925043a97c97f64cc9bda61659c878481dc Mon Sep 17 00:00:00 2001
|
|
|
+From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
+Date: Tue, 13 Apr 2021 12:44:03 +0200
|
|
|
+Subject: [PATCH] mwifiex: Fix an incorrect comment
|
|
|
+
|
|
|
+We're sending DELBA requests here, not ADDBA requests.
|
|
|
+
|
|
|
+Patchset: wifi
|
|
|
+---
|
|
|
+ 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 5d75c971004b..b36b2103d555 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/11n.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/11n.c
|
|
|
+@@ -127,7 +127,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
|
|
|
+
|
|
|
+From e0b794a9e1eb57fb491dacb40ae55c7d31e4ac1d Mon Sep 17 00:00:00 2001
|
|
|
+From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
+Date: Tue, 13 Apr 2021 12:45:59 +0200
|
|
|
+Subject: [PATCH] mwifiex: Send DELBA requests according to spec
|
|
|
+
|
|
|
+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.
|
|
|
+
|
|
|
+Patchset: wifi
|
|
|
+---
|
|
|
+ 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 b36b2103d555..4ed6ae8a96f1 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/11n.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/11n.c
|
|
|
+@@ -664,14 +664,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
|
|
|
+
|
|
|
+From f603397580ee3d4ea8b0bb1ef795a0aa72d73113 Mon Sep 17 00:00:00 2001
|
|
|
+From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
+Date: Tue, 13 Apr 2021 12:57:41 +0200
|
|
|
+Subject: [PATCH] mwifiex: Ignore BTCOEX events from the firmware
|
|
|
+
|
|
|
+The firmware of the pcie 88W8897 chip sends those events very
|
|
|
+unreliably, which means we sometimes end up actually capping the window
|
|
|
+size while bluetooth is disabled, artifically limiting wifi speeds even
|
|
|
+though it's not needed.
|
|
|
+
|
|
|
+Since we can't fix the firmware, let's just ignore those events, it
|
|
|
+seems that the Windows driver also doesn't change the rx/tx block ack
|
|
|
+buffer sizes when bluetooth gets enabled or disabled, so this is
|
|
|
+consistent with the Windows driver.
|
|
|
+
|
|
|
+Patchset: wifi
|
|
|
+---
|
|
|
+ drivers/net/wireless/marvell/mwifiex/sta_event.c | 4 +---
|
|
|
+ 1 file changed, 1 insertion(+), 3 deletions(-)
|
|
|
+
|
|
|
+diff --git a/drivers/net/wireless/marvell/mwifiex/sta_event.c b/drivers/net/wireless/marvell/mwifiex/sta_event.c
|
|
|
+index a327fc5b36e3..6228971d9b8b 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/sta_event.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/sta_event.c
|
|
|
+@@ -1058,9 +1058,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
|
|
|
+ adapter->event_skb);
|
|
|
+ break;
|
|
|
+ case EVENT_BT_COEX_WLAN_PARA_CHANGE:
|
|
|
+- dev_dbg(adapter->dev, "EVENT: BT coex wlan param update\n");
|
|
|
+- mwifiex_bt_coex_wlan_param_update_event(priv,
|
|
|
+- adapter->event_skb);
|
|
|
++ dev_dbg(adapter->dev, "EVENT: ignoring BT coex wlan param update\n");
|
|
|
+ break;
|
|
|
+ case EVENT_RXBA_SYNC:
|
|
|
+ dev_dbg(adapter->dev, "EVENT: RXBA_SYNC\n");
|
|
|
+--
|
|
|
+2.31.1
|
|
|
+
|