|
@@ -1,4 +1,4 @@
|
|
|
-From 39ff2bc389326a9ac9424ba7f7b30941c72b7162 Mon Sep 17 00:00:00 2001
|
|
|
+From 9fd55ebcbc1b9ed6b87cb1e5304d7707d20dbc02 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
|
|
@@ -206,7 +206,7 @@ index 000000000000..5326ae7e5671
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From ebbb55cf839072eaa7fde87edb1e833718cb7656 Mon Sep 17 00:00:00 2001
|
|
|
+From d11fe3d6d2e588555f0ee035959b2c7837191d77 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+
|
|
@@ -407,7 +407,7 @@ index 5326ae7e5671..8b9dcb5070d8 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From beba510c3ae9eb37c0554f0d88c229cf8611f191 Mon Sep 17 00:00:00 2001
|
|
|
+From 40974a2b1fbfda4c7901b0c7c1fb2acfdc9a1251 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
|
|
@@ -586,7 +586,7 @@ index 8b9dcb5070d8..3ef7440418e3 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 32bb8023bf71dbd48f3ef3f2368e05ceb346c8f9 Mon Sep 17 00:00:00 2001
|
|
|
+From 25a9e012553522f50ae04146c93e5c4be4cc2e26 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
|
|
@@ -648,7 +648,7 @@ index f0a6fa0a7ae5..34dcd84f02a6 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From cf97713f83494149cc71e344415b917f654e812b Mon Sep 17 00:00:00 2001
|
|
|
+From 8e11b48f62205eeba4fdee9f05e3060e43006146 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+
|
|
@@ -803,7 +803,7 @@ index 3ef7440418e3..a95ebac06e13 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 98a436bbea1c6820a15a2a34ab9daca521a6040e Mon Sep 17 00:00:00 2001
|
|
|
+From 7c88d7dd1e7a7a0f723063f1f5b36ed59cc11fda 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
|
|
@@ -860,7 +860,7 @@ index fcedc663ccc7..5eea6cb73fb7 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From b0883dbe1c1d7a27679d34b1c5f7f24816bef57d Mon Sep 17 00:00:00 2001
|
|
|
+From b3b5bd3b26a122b2a3c3884db4a600d3b1f95d6b 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
|
|
@@ -1027,7 +1027,7 @@ index a95ebac06e13..4ec2ae72f632 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 9acc247dbf359c9bd348ef46a05a801e56a3a9dc Mon Sep 17 00:00:00 2001
|
|
|
+From c4383694d5f502645bd6839c0c6d713256497c6d 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
|
|
@@ -1116,7 +1116,7 @@ index 7dc54c446559..505a90743f2f 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From c0b9d1002524687cc9d8a9b2d4f9c80bcb373820 Mon Sep 17 00:00:00 2001
|
|
|
+From a8b8734cbbe2e813c29e36a59261f88775db74db 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
|
|
@@ -1194,7 +1194,7 @@ index 2953b96b3ced..3459ee86530c 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 49b7afd20625f89244f9284edd3484640c6d3d9f Mon Sep 17 00:00:00 2001
|
|
|
+From 05b88cd723063a9081f6ec4a036bde9f9bdaf71e 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
|
|
@@ -1295,7 +1295,7 @@ index a6b9dc6700b1..d50fd8570475 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 58c87f5bf44d6a5f8e301a4131d55b828d6eb96e Mon Sep 17 00:00:00 2001
|
|
|
+From 0e47c875bc9b6ac9f1a40c90916042911169e9fa 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
|
|
@@ -1528,7 +1528,7 @@ index d50fd8570475..3a79a55bbfd2 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 1bc073550135ded9107754bbae92a81367edc91a Mon Sep 17 00:00:00 2001
|
|
|
+From fd6d71fb9c9f497180c9817a0a967582b76b8e21 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
|
|
@@ -1596,7 +1596,7 @@ index 3a79a55bbfd2..66e978088061 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From fa836797d3835462de121d91353e63de9f0d0013 Mon Sep 17 00:00:00 2001
|
|
|
+From 99e6ae9de4a658148fe63f38bf310e4d5b71e5eb 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
|
|
@@ -1772,7 +1772,7 @@ index 66e978088061..db30f595e9f9 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 029b06aaf9c58bab9ba728237a3c317048824975 Mon Sep 17 00:00:00 2001
|
|
|
+From 33b6c08a293eb71834d795d92243d36404fd7d11 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
|
|
@@ -1875,7 +1875,7 @@ index db30f595e9f9..60de1cec77c7 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 66296a87c90403f3ff3ee44bc53453cfa11d3e9f Mon Sep 17 00:00:00 2001
|
|
|
+From 2f41912acacfff4105465c002d4441ab2747d577 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
|
|
@@ -1964,7 +1964,7 @@ index 60de1cec77c7..a37b504bd084 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 72c4a7aaba735787ac6f574fdbf45f32d3d41562 Mon Sep 17 00:00:00 2001
|
|
|
+From 8c41c0c7094651f9d5d2a9bdaa58ae7c8ea58882 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
|
|
@@ -1991,7 +1991,7 @@ index a37b504bd084..e65f285e3efe 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From 530a64f1b73ab05e7e8142d7d4fff11b6fa59886 Mon Sep 17 00:00:00 2001
|
|
|
+From b746e9af8a70f8ff8ff4c47c3d28c4a36a9d9df7 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
|
|
@@ -2046,7 +2046,7 @@ index e65f285e3efe..a290312313f3 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
-From f385aa6c37ff8de85d86351684a7614e76592e8c Mon Sep 17 00:00:00 2001
|
|
|
+From 671cab905d21b0cc5adbed250da46a3dc9c6ecbc 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
|
|
@@ -2078,3 +2078,443 @@ index a290312313f3..1e1cf523e228 100644
|
|
|
--
|
|
|
2.31.1
|
|
|
|
|
|
+From 98582f4c190e170c3a25b9020ad04920575bd140 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 3a11342a6bde..5487df8f994d 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
|
|
+@@ -608,6 +608,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);
|
|
|
+@@ -714,6 +719,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_bh(&adapter->cmd_pending_q_lock);
|
|
|
+ if (add_tail)
|
|
|
+ list_add_tail(&cmd_node->list, &adapter->cmd_pending_q);
|
|
|
+@@ -1216,6 +1230,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 6283df5aaaf8..b30547d1f153 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/main.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/main.c
|
|
|
+@@ -401,6 +401,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,
|
|
|
+@@ -418,6 +424,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,
|
|
|
+@@ -434,6 +446,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 5923c5c14c8d..90012cbcfd15 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 d3a968ef21ef..76db9a7b8199 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 d3b5ba4321d31e42162227d948daada5539c2f77 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 b30547d1f153..347d29fd92c0 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/main.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/main.c
|
|
|
+@@ -226,6 +226,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.
|
|
|
+ *
|
|
|
+@@ -356,6 +369,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 90012cbcfd15..1e829d84b1f6 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 119ccacd1fcc..fb245adba19f 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
|
|
+@@ -707,6 +707,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 7872d72a64d4cbe46c1c811ed504a45c97ee5d6d 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 1e1cf523e228..1cdd66c37cfc 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
|
|
+@@ -3480,7 +3480,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 0c087124c27767ec0cb52bc8f4a6f1400c7b6119 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 1cdd66c37cfc..6ad935c1bb47 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
|
|
|
+
|
|
|
+From 7f55348effced605bebc1813146c73b4c592131a 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 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
|
|
|
+
|
|
|
+From b4deeb3bb9bf7d0b56e624b1e11220a9f38ac20b 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 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
|
|
|
+
|
|
|
+From db39930e1cccb386fc4c67bea3e409c2ddb4196e 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 bc79ca4cb803..5e9e67d97857 100644
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/sta_event.c
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/sta_event.c
|
|
|
+@@ -1056,9 +1056,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
|
|
|
+
|