瀏覽代碼

Update v5.10 patches

Changes:
  - Attempt to properly fix WiFi firmware crashes caused by power-save
    mode and suspend. This aims to fix WiFi crashes without the need to
    disable power-saving options and achieve better power consumption.
  - Try to fix firmware wakeup issues.
  - Try to reduce WiFi speed impact when Bluetooth is active.
  - Fixes for P2P and AP modes. This should get miracast working.

Links:
 - kernel: https://github.com/linux-surface/kernel/commit/74e1f1ad57cf557ca8d99f605d53edcac39cbdba
Maximilian Luz 4 年之前
父節點
當前提交
3c3b57efca

+ 2 - 2
patches/5.10/0001-surface3-oemb.patch

@@ -1,4 +1,4 @@
-From b76df1eb928d9f3cc6ad7594accc3ed55c570d1f Mon Sep 17 00:00:00 2001
+From 333d3e77305b66bdcd519d8f5e70d0fa1b36cbd6 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Sun, 18 Oct 2020 16:42:44 +0900
 Subject: [PATCH] (surface3-oemb) add DMI matches for Surface 3 with broken DMI
@@ -97,5 +97,5 @@ index 2752dc955733..ef36a316e2ed 100644
  };
  
 -- 
-2.30.2
+2.31.0
 

+ 1243 - 304
patches/5.10/0002-wifi.patch

@@ -1,4 +1,4 @@
-From f335f79392d382b4907f519cc335ae530278f179 Mon Sep 17 00:00:00 2001
+From 28de2a0b3d0599209bc9defb1916d0a089252d02 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
@@ -204,9 +204,9 @@ index 000000000000..5326ae7e5671
 +
 +void mwifiex_initialize_quirks(struct pcie_service_card *card);
 -- 
-2.30.2
+2.31.0
 
-From 57c807ccf56e0992624360d3c5bb8fe7817c7137 Mon Sep 17 00:00:00 2001
+From ba1c7d048255115bb24ce1c70150d1daf201461f 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+
@@ -405,9 +405,9 @@ index 5326ae7e5671..8b9dcb5070d8 100644
  void mwifiex_initialize_quirks(struct pcie_service_card *card);
 +int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
 -- 
-2.30.2
+2.31.0
 
-From bbce85960313628ccc39252f9895c4feac475614 Mon Sep 17 00:00:00 2001
+From 78f06bb476f58a52dd5f3f33aa21880be88d68b3 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
@@ -584,9 +584,9 @@ index 8b9dcb5070d8..3ef7440418e3 100644
  int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
 +int mwifiex_pcie_reset_wsid_quirk(struct pci_dev *pdev);
 -- 
-2.30.2
+2.31.0
 
-From 888a0dca7c7b1d0b78dcd978d11d990ae02995c2 Mon Sep 17 00:00:00 2001
+From 085011fadc4e78876cd66e552fc26a25d427fb82 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
@@ -646,200 +646,9 @@ index f0a6fa0a7ae5..34dcd84f02a6 100644
  		.ident = "Surface Pro 3",
  		.matches = {
 -- 
-2.30.2
+2.31.0
 
-From 93d7b97892580090cc43bb4706ecbd45d5d3b9b3 Mon Sep 17 00:00:00 2001
-From: Tsuchiya Yuto <kitakar@gmail.com>
-Date: Thu, 24 Sep 2020 01:56:34 +0900
-Subject: [PATCH] mwifiex: pcie: use shutdown_sw()/reinit_sw() on
- suspend()/resume()
-
-There are issues with S0ix achievement and AP scanning after suspend
-with the current Host Sleep method.
-
-When using the Host Sleep method, it prevents the platform to reach S0ix
-during suspend. Also, after suspend, sometimes AP scanning won't work,
-resulting in non-working wifi.
-
-To fix such issues, perform shutdown_sw()/reinit_sw() instead of Host
-Sleep.
-
-As a side effect, this patch disables wakeups (means that Wake-On-WLAN
-can't be used anymore, if it was working before), and might also reset
-some internal states.
-
-Note that suspend() no longer checks if it's already suspended.
-
-With the previous Host Sleep method, the check was done by looking at
-adapter->hs_activated in mwifiex_enable_hs() [sta_ioctl.c], but not
-MWIFIEX_IS_SUSPENDED. So, what the previous method checked was instead
-Host Sleep state, not suspend itself. Therefore, there is no need to check
-the suspend state now.
-
-Also removed comment for suspend state check at top of suspend()
-accordingly.
-
-Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com>
-Patchset: wifi
----
- drivers/net/wireless/marvell/mwifiex/main.c |  4 +--
- drivers/net/wireless/marvell/mwifiex/pcie.c | 29 +++++++--------------
- 2 files changed, 12 insertions(+), 21 deletions(-)
-
-diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
-index 6283df5aaaf8..ee52fb839ef7 100644
---- a/drivers/net/wireless/marvell/mwifiex/main.c
-+++ b/drivers/net/wireless/marvell/mwifiex/main.c
-@@ -1455,7 +1455,7 @@ static void mwifiex_uninit_sw(struct mwifiex_adapter *adapter)
- }
- 
- /*
-- * This function gets called during PCIe function level reset.
-+ * This function can be used for shutting down the adapter SW.
-  */
- int mwifiex_shutdown_sw(struct mwifiex_adapter *adapter)
- {
-@@ -1483,7 +1483,7 @@ int mwifiex_shutdown_sw(struct mwifiex_adapter *adapter)
- }
- EXPORT_SYMBOL_GPL(mwifiex_shutdown_sw);
- 
--/* This function gets called during PCIe function level reset. Required
-+/* This function can be used for reinitting the adapter SW. Required
-  * code is extracted from mwifiex_add_card()
-  */
- int
-diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
-index 94561ddaf126..7b25335f1df3 100644
---- a/drivers/net/wireless/marvell/mwifiex/pcie.c
-+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
-@@ -294,8 +294,7 @@ static bool mwifiex_pcie_ok_to_access_hw(struct mwifiex_adapter *adapter)
-  * registered functions must have drivers with suspend and resume
-  * methods. Failing that the kernel simply removes the whole card.
-  *
-- * If already not suspended, this function allocates and sends a host
-- * sleep activate request to the firmware and turns off the traffic.
-+ * This function shuts down the adapter.
-  */
- static int mwifiex_pcie_suspend(struct device *dev)
- {
-@@ -303,31 +302,21 @@ static int mwifiex_pcie_suspend(struct device *dev)
- 	struct pcie_service_card *card = dev_get_drvdata(dev);
- 
- 
--	/* Might still be loading firmware */
--	wait_for_completion(&card->fw_done);
--
- 	adapter = card->adapter;
- 	if (!adapter) {
- 		dev_err(dev, "adapter is not valid\n");
- 		return 0;
- 	}
- 
--	mwifiex_enable_wake(adapter);
--
--	/* Enable the Host Sleep */
--	if (!mwifiex_enable_hs(adapter)) {
-+	/* Shut down SW */
-+	if (mwifiex_shutdown_sw(adapter)) {
- 		mwifiex_dbg(adapter, ERROR,
- 			    "cmd: failed to suspend\n");
--		clear_bit(MWIFIEX_IS_HS_ENABLING, &adapter->work_flags);
--		mwifiex_disable_wake(adapter);
- 		return -EFAULT;
- 	}
- 
--	flush_workqueue(adapter->workqueue);
--
- 	/* Indicate device suspended */
- 	set_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags);
--	clear_bit(MWIFIEX_IS_HS_ENABLING, &adapter->work_flags);
- 
- 	return 0;
- }
-@@ -337,13 +326,13 @@ static int mwifiex_pcie_suspend(struct device *dev)
-  * registered functions must have drivers with suspend and resume
-  * methods. Failing that the kernel simply removes the whole card.
-  *
-- * If already not resumed, this function turns on the traffic and
-- * sends a host sleep cancel request to the firmware.
-+ * If already not resumed, this function reinits the adapter.
-  */
- static int mwifiex_pcie_resume(struct device *dev)
- {
- 	struct mwifiex_adapter *adapter;
- 	struct pcie_service_card *card = dev_get_drvdata(dev);
-+	int ret;
- 
- 
- 	if (!card->adapter) {
-@@ -361,9 +350,11 @@ static int mwifiex_pcie_resume(struct device *dev)
- 
- 	clear_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags);
- 
--	mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA),
--			  MWIFIEX_ASYNC_CMD);
--	mwifiex_disable_wake(adapter);
-+	ret = mwifiex_reinit_sw(adapter);
-+	if (ret)
-+		dev_err(dev, "reinit failed: %d\n", ret);
-+	else
-+		mwifiex_dbg(adapter, INFO, "%s, successful\n", __func__);
- 
- 	return 0;
- }
--- 
-2.30.2
-
-From 44338db5c7ecab4c2aa41fdcd63b1dd6a994885d Mon Sep 17 00:00:00 2001
-From: Tsuchiya Yuto <kitakar@gmail.com>
-Date: Mon, 24 Aug 2020 17:11:35 +0900
-Subject: [PATCH] mwifiex: pcie: add enable_device_dump module parameter
-
-The devicve_dump may take a little bit long time and users may want to
-disable the dump for daily usage.
-
-This commit adds a new module parameter and disables device_dump by
-default.
-
-Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com>
-Patchset: wifi
----
- drivers/net/wireless/marvell/mwifiex/pcie.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
-index 7b25335f1df3..f7e0b86eb553 100644
---- a/drivers/net/wireless/marvell/mwifiex/pcie.c
-+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
-@@ -183,6 +183,11 @@ static const struct mwifiex_pcie_device mwifiex_pcie8997 = {
- 	.can_ext_scan = true,
- };
- 
-+static bool enable_device_dump;
-+module_param(enable_device_dump, bool, 0644);
-+MODULE_PARM_DESC(enable_device_dump,
-+		 "enable device_dump (default: disabled)");
-+
- static const struct of_device_id mwifiex_pcie_of_match_table[] = {
- 	{ .compatible = "pci11ab,2b42" },
- 	{ .compatible = "pci1b4b,2b42" },
-@@ -2944,6 +2949,12 @@ static void mwifiex_pcie_fw_dump(struct mwifiex_adapter *adapter)
- 
- static void mwifiex_pcie_device_dump_work(struct mwifiex_adapter *adapter)
- {
-+	if (!enable_device_dump) {
-+		mwifiex_dbg(adapter, MSG,
-+			    "device_dump is disabled by module parameter\n");
-+		return;
-+	}
-+
- 	adapter->devdump_data = vzalloc(MWIFIEX_FW_DUMP_SIZE);
- 	if (!adapter->devdump_data) {
- 		mwifiex_dbg(adapter, ERROR,
--- 
-2.30.2
-
-From 83864f016a1e6af36cd27a3062780d4ada66b969 Mon Sep 17 00:00:00 2001
+From cbdab24b6f2db8a5688afb80967d5a6f41a2df1d 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+
@@ -861,10 +670,10 @@ Patchset: wifi
  3 files changed, 27 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
-index f7e0b86eb553..2dcbf893f2ea 100644
+index 94561ddaf126..fcedc663ccc7 100644
 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c
 +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
-@@ -375,6 +375,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
+@@ -379,6 +379,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
  					const struct pci_device_id *ent)
  {
  	struct pcie_service_card *card;
@@ -872,7 +681,7 @@ index f7e0b86eb553..2dcbf893f2ea 100644
  	int ret;
  
  	pr_debug("info: vendor=0x%4.04X device=0x%4.04X rev=%d\n",
-@@ -416,6 +417,12 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
+@@ -420,6 +421,12 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
  		return -1;
  	}
  
@@ -992,150 +801,1280 @@ index 3ef7440418e3..a95ebac06e13 100644
  void mwifiex_initialize_quirks(struct pcie_service_card *card);
  int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
 -- 
-2.30.2
+2.31.0
 
-From a2b48d821f7e92f231954f862d3319bc1982b6ba Mon Sep 17 00:00:00 2001
-From: Tsuchiya Yuto <kitakar@gmail.com>
-Date: Sun, 4 Oct 2020 00:25:48 +0900
-Subject: [PATCH] mwifiex: add allow_ps_mode module parameter
+From f805a115972cc3a700a09be55c12ae1157a07fb8 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
 
-This commit adds the allow_ps_mode module parameter and set it false
-(disallowed) by default, to make ps_mode (power_save) control easier.
+On the 88W8897 card it's very important the TX ring write pointer is
+updated correctly to its new value before setting the TX ready
+interrupt, otherwise the firmware appears to crash (probably because
+it's trying to DMA-read from the wrong place).
 
-On some setups (e.g., with 5GHz AP), power_save causes connection
-completely unstable. So, we need to disable it. However, userspace tools
-may try to enable it. For this reason, we need to tell userspace that
-power_save is disallowed by default.
+Since PCI uses "posted writes" when writing to a register, it's not
+guaranteed that a write will happen immediately. That means the pointer
+might be outdated when setting the TX ready interrupt, leading to
+firmware crashes especially when ASPM L1 and L1 substates are enabled
+(because of the higher link latency, the write will probably take
+longer).
 
-When this parameter is set to false, changing the power_save mode will
-be disallowed like the following:
+So fix those firmware crashes by always forcing non-posted writes. We do
+that by simply reading back the register after writing it, just as a lot
+of other drivers do.
 
-    $ sudo iw dev mlan0 set power_save on
-    command failed: Operation not permitted (-1)
+There are two reproducers that are fixed with this patch:
+
+1) During rx/tx traffic and with ASPM L1 substates enabled (the enabled
+substates are platform dependent), the firmware crashes and eventually a
+command timeout appears in the logs. That crash is fixed by using a
+non-posted write in mwifiex_pcie_send_data().
+
+2) When sending lots of commands to the card, waking it up from sleep in
+very quick intervals, the firmware eventually crashes. That crash
+appears to be fixed by some other non-posted write included here.
+
+Patchset: wifi
+---
+ drivers/net/wireless/marvell/mwifiex/pcie.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
+index fcedc663ccc7..5eea6cb73fb7 100644
+--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
++++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
+@@ -237,6 +237,12 @@ static int mwifiex_write_reg(struct mwifiex_adapter *adapter, int reg, u32 data)
+ 
+ 	iowrite32(data, card->pci_mmap1 + reg);
+ 
++	/* Do a read-back, which makes the write non-posted, ensuring the
++	 * completion before returning.
++	 * The firmware of the 88W8897 card is buggy and this avoids crashes.
++	 */
++	ioread32(card->pci_mmap1 + reg);
++
+ 	return 0;
+ }
+ 
+-- 
+2.31.0
+
+From 4800649d61cde4e06a6681d014b90ace2270a65c 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
+ devices
+
+The most recent firmware of the 88W8897 card reports a hardcoded LTR
+value to the system during initialization, probably as an (unsuccessful)
+attempt of the developers to fix firmware crashes. This LTR value
+prevents most of the Microsoft Surface devices from entering deep
+powersaving states (either platform C-State 10 or S0ix state), because
+the exit latency of that state would be higher than what the card can
+tolerate.
+
+Turns out the card works just the same (including the firmware crashes)
+no matter if that hardcoded LTR value is reported or not, so it's kind
+of useless and only prevents us from saving power.
+
+To get rid of those hardcoded LTR reports, it's possible to reset the
+PCI bridge device after initializing the cards firmware. I'm not exactly
+sure why that works, maybe the power management subsystem of the PCH
+resets its stored LTR values when doing a function level reset of the
+bridge device. Doing the reset once after starting the wifi firmware
+works very well, probably because the firmware only reports that LTR
+value a single time during firmware startup.
 
-Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com>
 Patchset: wifi
 ---
- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
+ drivers/net/wireless/marvell/mwifiex/pcie.c   | 12 +++++++++
+ .../wireless/marvell/mwifiex/pcie_quirks.c    | 26 +++++++++++++------
+ .../wireless/marvell/mwifiex/pcie_quirks.h    |  1 +
+ 3 files changed, 31 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
+index 5eea6cb73fb7..7dc54c446559 100644
+--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
++++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
+@@ -1764,9 +1764,21 @@ mwifiex_pcie_send_boot_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb)
+ static int mwifiex_pcie_init_fw_port(struct mwifiex_adapter *adapter)
+ {
+ 	struct pcie_service_card *card = adapter->card;
++	struct pci_dev *pdev = card->dev;
++	struct pci_dev *parent_pdev = pci_upstream_bridge(pdev);
+ 	const struct mwifiex_pcie_card_reg *reg = card->pcie.reg;
+ 	int tx_wrap = card->txbd_wrptr & reg->tx_wrap_mask;
+ 
++	/* Trigger a function level reset of the PCI bridge device, this makes
++	 * the firmware of PCIe 88W8897 cards stop reporting a fixed LTR value
++	 * that prevents the system from entering package C10 and S0ix powersaving
++	 * states.
++	 * We need to do it here because it must happen after firmware
++	 * initialization and this function is called after that is done.
++	 */
++	if (card->quirks & QUIRK_DO_FLR_ON_BRIDGE)
++		pci_reset_function(parent_pdev);
++
+ 	/* Write the RX ring read pointer in to reg->rx_rdptr */
+ 	if (mwifiex_write_reg(adapter, reg->rx_rdptr, card->rxbd_rdptr |
+ 			      tx_wrap)) {
+diff --git a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c
+index a2aeb2af907e..6885575826a6 100644
+--- a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c
++++ b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c
+@@ -33,7 +33,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = {
+ 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Pro 4"),
+ 		},
+ 		.driver_data = (void *)(QUIRK_FW_RST_D3COLD |
+-					QUIRK_NO_BRIDGE_D3),
++					QUIRK_NO_BRIDGE_D3 |
++					QUIRK_DO_FLR_ON_BRIDGE),
+ 	},
+ 	{
+ 		.ident = "Surface Pro 5",
+@@ -43,7 +44,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = {
+ 			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "Surface_Pro_1796"),
+ 		},
+ 		.driver_data = (void *)(QUIRK_FW_RST_D3COLD |
+-					QUIRK_NO_BRIDGE_D3),
++					QUIRK_NO_BRIDGE_D3 |
++					QUIRK_DO_FLR_ON_BRIDGE),
+ 	},
+ 	{
+ 		.ident = "Surface Pro 5 (LTE)",
+@@ -53,7 +55,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = {
+ 			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "Surface_Pro_1807"),
+ 		},
+ 		.driver_data = (void *)(QUIRK_FW_RST_D3COLD |
+-					QUIRK_NO_BRIDGE_D3),
++					QUIRK_NO_BRIDGE_D3 |
++					QUIRK_DO_FLR_ON_BRIDGE),
+ 	},
+ 	{
+ 		.ident = "Surface Pro 6",
+@@ -62,7 +65,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = {
+ 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Pro 6"),
+ 		},
+ 		.driver_data = (void *)(QUIRK_FW_RST_D3COLD |
+-					QUIRK_NO_BRIDGE_D3),
++					QUIRK_NO_BRIDGE_D3 |
++					QUIRK_DO_FLR_ON_BRIDGE),
+ 	},
+ 	{
+ 		.ident = "Surface Book 1",
+@@ -71,7 +75,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = {
+ 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Book"),
+ 		},
+ 		.driver_data = (void *)(QUIRK_FW_RST_D3COLD |
+-					QUIRK_NO_BRIDGE_D3),
++					QUIRK_NO_BRIDGE_D3 |
++					QUIRK_DO_FLR_ON_BRIDGE),
+ 	},
+ 	{
+ 		.ident = "Surface Book 2",
+@@ -80,7 +85,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = {
+ 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Book 2"),
+ 		},
+ 		.driver_data = (void *)(QUIRK_FW_RST_D3COLD |
+-					QUIRK_NO_BRIDGE_D3),
++					QUIRK_NO_BRIDGE_D3 |
++					QUIRK_DO_FLR_ON_BRIDGE),
+ 	},
+ 	{
+ 		.ident = "Surface Laptop 1",
+@@ -89,7 +95,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = {
+ 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Laptop"),
+ 		},
+ 		.driver_data = (void *)(QUIRK_FW_RST_D3COLD |
+-					QUIRK_NO_BRIDGE_D3),
++					QUIRK_NO_BRIDGE_D3 |
++					QUIRK_DO_FLR_ON_BRIDGE),
+ 	},
+ 	{
+ 		.ident = "Surface Laptop 2",
+@@ -98,7 +105,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = {
+ 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Laptop 2"),
+ 		},
+ 		.driver_data = (void *)(QUIRK_FW_RST_D3COLD |
+-					QUIRK_NO_BRIDGE_D3),
++					QUIRK_NO_BRIDGE_D3 |
++					QUIRK_DO_FLR_ON_BRIDGE),
+ 	},
+ 	{
+ 		.ident = "Surface 3",
+@@ -147,6 +155,8 @@ void mwifiex_initialize_quirks(struct pcie_service_card *card)
+ 	if (card->quirks & QUIRK_NO_BRIDGE_D3)
+ 		dev_info(&pdev->dev,
+ 			 "quirk no_brigde_d3 enabled\n");
++	if (card->quirks & QUIRK_DO_FLR_ON_BRIDGE)
++		dev_info(&pdev->dev, "quirk do_flr_on_bridge enabled\n");
+ }
+ 
+ static void mwifiex_pcie_set_power_d3cold(struct pci_dev *pdev)
+diff --git a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.h b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.h
+index a95ebac06e13..4ec2ae72f632 100644
+--- a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.h
++++ b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.h
+@@ -12,6 +12,7 @@
+  */
+ #define QUIRK_FW_RST_WSID_S3	BIT(1)
+ #define QUIRK_NO_BRIDGE_D3	BIT(2)
++#define QUIRK_DO_FLR_ON_BRIDGE	BIT(3)
+ 
+ void mwifiex_initialize_quirks(struct pcie_service_card *card);
+ int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
+-- 
+2.31.0
+
+From 238cdbc3a753dc6812d28e8d553b99fc4763dfe0 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
+
+It seems that the firmware of the 88W8897 card sometimes ignores or
+misses when we try to wake it up by reading the firmware status
+register. This leads to the firmware wakeup timeout expiring and the
+driver resetting the card because we assume the firmware has hung up or
+crashed (unfortunately that's not unlikely with this card).
+
+Turns out that most of the time the firmware actually didn't hang up,
+but simply "missed" our wakeup request and doesn't send us an AWAKE
+event.
+
+Trying again to read the firmware status register after a short timeout
+usually makes the firmware wake we up as expected, so add a small retry
+loop to mwifiex_pm_wakeup_card() that looks at the interrupt status to
+check whether the card woke up.
+
+The number of tries and timeout lengths for this were determined
+experimentally: The firmware usually takes about 500 us to wake up
+after we attempt to read the status register. In some cases where the
+firmware is very busy (for example while doing a bluetooth scan) it
+might even miss our requests for multiple milliseconds, which is why
+after 15 tries the waiting time gets increased to 10 ms. The maximum
+number of tries it took to wake the firmware when testing this was
+around 20, so a maximum number of 50 tries should give us plenty of
+safety margin.
+
+A good reproducer for this issue is letting the firmware sleep and wake
+up in very short intervals, for example by pinging an device on the
+network every 0.1 seconds.
+
+Patchset: wifi
+---
+ drivers/net/wireless/marvell/mwifiex/pcie.c | 29 ++++++++++++++++-----
+ 1 file changed, 23 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
+index 7dc54c446559..505a90743f2f 100644
+--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
++++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
+@@ -666,6 +666,7 @@ static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter)
+ {
+ 	struct pcie_service_card *card = adapter->card;
+ 	const struct mwifiex_pcie_card_reg *reg = card->pcie.reg;
++	int n_tries = 0;
+ 
+ 	mwifiex_dbg(adapter, EVENT,
+ 		    "event: Wakeup device...\n");
+@@ -673,12 +674,28 @@ static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter)
+ 	if (reg->sleep_cookie)
+ 		mwifiex_pcie_dev_wakeup_delay(adapter);
+ 
+-	/* Accessing fw_status register will wakeup device */
+-	if (mwifiex_write_reg(adapter, reg->fw_status, FIRMWARE_READY_PCIE)) {
+-		mwifiex_dbg(adapter, ERROR,
+-			    "Writing fw_status register failed\n");
+-		return -1;
+-	}
++	/* Access the fw_status register to wake up the device.
++	 * Since the 88W8897 firmware sometimes appears to ignore or miss
++	 * that wakeup request, we continue trying until we receive an
++	 * interrupt from the card.
++	 */
++	do {
++		if (mwifiex_write_reg(adapter, reg->fw_status, FIRMWARE_READY_PCIE)) {
++			mwifiex_dbg(adapter, ERROR,
++				    "Writing fw_status register failed\n");
++			return -1;
++		}
++
++		n_tries++;
++
++		if (n_tries <= 15)
++			usleep_range(400, 700);
++		else
++			msleep(10);
++	} while (n_tries <= 50 && READ_ONCE(adapter->int_status) == 0);
++
++	mwifiex_dbg(adapter, EVENT,
++		    "event: Tried %d times until firmware woke up\n", n_tries);
+ 
+ 	if (reg->sleep_cookie) {
+ 		mwifiex_pcie_dev_wakeup_delay(adapter);
+-- 
+2.31.0
+
+From 5c8ce69144a88cacfb8c2cb558fa3f8155601f3d 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
+ 88W8897
+
+The Marvell 88W8897 combined wifi and bluetooth card (pcie+usb version)
+is used in a lot of Microsoft Surface devices, and all those devices
+suffer from very low 2.4GHz wifi connection speeds while bluetooth is
+enabled. The reason for that is that the default passive scanning
+interval for Bluetooth Low Energy devices is quite high in Linux
+(interval of 60 msec and scan window of 30 msec, see hci_core.c), and
+the Marvell chip is known for its bad bt+wifi coexisting performance.
+
+So decrease that passive scan interval and make the scan window shorter
+on this particular device to allow for spending more time transmitting
+wifi signals: The new scan interval is 250 msec (0x190 * 0.625 msec) and
+the new scan window is 6.25 msec (0xa * 0,625 msec).
+
+This change has a very large impact on the 2.4GHz wifi speeds and gets
+it up to performance comparable with the Windows driver, which seems to
+apply a similar quirk.
+
+The interval and window length were tested and found to work very well
+with a lot of Bluetooth Low Energy devices, including the Surface Pen, a
+Bluetooth Speaker and two modern Bluetooth headphones. All devices were
+discovered immediately after turning them on. Even lower values were
+also tested, but they introduced longer delays until devices get
+discovered.
+
+Patchset: wifi
+---
+ drivers/bluetooth/btusb.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
+index 2953b96b3ced..3459ee86530c 100644
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -60,6 +60,7 @@ static struct usb_driver btusb_driver;
+ #define BTUSB_WIDEBAND_SPEECH	0x400000
+ #define BTUSB_VALID_LE_STATES   0x800000
+ #define BTUSB_QCA_WCN6855	0x1000000
++#define BTUSB_LOWER_LESCAN_INTERVAL	0x2000000
+ 
+ static const struct usb_device_id btusb_table[] = {
+ 	/* Generic Bluetooth USB device */
+@@ -356,6 +357,7 @@ static const struct usb_device_id blacklist_table[] = {
+ 	{ USB_DEVICE(0x1286, 0x2044), .driver_info = BTUSB_MARVELL },
+ 	{ USB_DEVICE(0x1286, 0x2046), .driver_info = BTUSB_MARVELL },
+ 	{ USB_DEVICE(0x1286, 0x204e), .driver_info = BTUSB_MARVELL },
++	{ USB_DEVICE(0x1286, 0x204c), .driver_info = BTUSB_LOWER_LESCAN_INTERVAL },
+ 
+ 	/* Intel Bluetooth devices */
+ 	{ USB_DEVICE(0x8087, 0x0025), .driver_info = BTUSB_INTEL_NEW |
+@@ -4092,6 +4094,19 @@ static int btusb_probe(struct usb_interface *intf,
+ 	if (id->driver_info & BTUSB_MARVELL)
+ 		hdev->set_bdaddr = btusb_set_bdaddr_marvell;
+ 
++	/* The Marvell 88W8897 combined wifi and bluetooth card is known for
++	 * very bad bt+wifi coexisting performance.
++	 *
++	 * Decrease the passive BT Low Energy scan interval a bit
++	 * (0x0190 * 0.625 msec = 250 msec) and make the scan window shorter
++	 * (0x000a * 0,625 msec = 6.25 msec). This allows for significantly
++	 * higher wifi throughput while passively scanning for BT LE devices.
++	 */
++	if (id->driver_info & BTUSB_LOWER_LESCAN_INTERVAL) {
++		hdev->le_scan_interval = 0x0190;
++		hdev->le_scan_window = 0x000a;
++	}
++
+ 	if (IS_ENABLED(CONFIG_BT_HCIBTUSB_MTK) &&
+ 	    (id->driver_info & BTUSB_MEDIATEK)) {
+ 		hdev->setup = btusb_mtk_setup;
+-- 
+2.31.0
+
+From faa8ad1819b0de0c7aec9dbaeb087f6e3f4e2fbf 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
+ changes
+
+Handle the obvious invalid virtual interface type changes with a general
+check instead of looking at the individual change.
+
+For type changes from P2P_CLIENT to P2P_GO and the other way round, this
+changes the behavior slightly: We now still do nothing, but return
+-EOPNOTSUPP instead of 0. Now that behavior was incorrect before and
+still is, because type changes between these two types are actually
+possible and supported, which we'll fix in a following commit.
+
+Patchset: wifi
+---
+ .../net/wireless/marvell/mwifiex/cfg80211.c   | 39 +++++++------------
+ 1 file changed, 14 insertions(+), 25 deletions(-)
 
 diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
-index a6b9dc6700b1..943bc1e8ceae 100644
+index a6b9dc6700b1..d50fd8570475 100644
 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
 +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
-@@ -25,6 +25,11 @@
- static char *reg_alpha2;
- module_param(reg_alpha2, charp, 0);
+@@ -1141,6 +1141,20 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 		return -EBUSY;
+ 	}
  
-+static bool allow_ps_mode;
-+module_param(allow_ps_mode, bool, 0644);
-+MODULE_PARM_DESC(allow_ps_mode,
-+		 "allow WiFi power management to be enabled. (default: disallowed)");
++	if (type == NL80211_IFTYPE_UNSPECIFIED) {
++		mwifiex_dbg(priv->adapter, INFO,
++			    "%s: no new type specified, keeping old type %d\n",
++			    dev->name, curr_iftype);
++		return 0;
++	}
 +
- static const struct ieee80211_iface_limit mwifiex_ap_sta_limits[] = {
- 	{
- 		.max = MWIFIEX_MAX_BSS_NUM,
-@@ -435,6 +440,17 @@ mwifiex_cfg80211_set_power_mgmt(struct wiphy *wiphy,
- 
- 	ps_mode = enabled;
++	if (curr_iftype == type) {
++		mwifiex_dbg(priv->adapter, INFO,
++			    "%s: interface already is of type %d\n",
++			    dev->name, curr_iftype);
++		return 0;
++	}
++
+ 	switch (curr_iftype) {
+ 	case NL80211_IFTYPE_ADHOC:
+ 		switch (type) {
+@@ -1160,12 +1174,6 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 		case NL80211_IFTYPE_AP:
+ 			return mwifiex_change_vif_to_ap(dev, curr_iftype, type,
+ 							params);
+-		case NL80211_IFTYPE_UNSPECIFIED:
+-			mwifiex_dbg(priv->adapter, INFO,
+-				    "%s: kept type as IBSS\n", dev->name);
+-			fallthrough;
+-		case NL80211_IFTYPE_ADHOC:	/* This shouldn't happen */
+-			return 0;
+ 		default:
+ 			mwifiex_dbg(priv->adapter, ERROR,
+ 				    "%s: changing to %d not supported\n",
+@@ -1191,12 +1199,6 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 		case NL80211_IFTYPE_AP:
+ 			return mwifiex_change_vif_to_ap(dev, curr_iftype, type,
+ 							params);
+-		case NL80211_IFTYPE_UNSPECIFIED:
+-			mwifiex_dbg(priv->adapter, INFO,
+-				    "%s: kept type as STA\n", dev->name);
+-			fallthrough;
+-		case NL80211_IFTYPE_STATION:	/* This shouldn't happen */
+-			return 0;
+ 		default:
+ 			mwifiex_dbg(priv->adapter, ERROR,
+ 				    "%s: changing to %d not supported\n",
+@@ -1214,12 +1216,6 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 		case NL80211_IFTYPE_P2P_GO:
+ 			return mwifiex_change_vif_to_p2p(dev, curr_iftype,
+ 							 type, params);
+-		case NL80211_IFTYPE_UNSPECIFIED:
+-			mwifiex_dbg(priv->adapter, INFO,
+-				    "%s: kept type as AP\n", dev->name);
+-			fallthrough;
+-		case NL80211_IFTYPE_AP:		/* This shouldn't happen */
+-			return 0;
+ 		default:
+ 			mwifiex_dbg(priv->adapter, ERROR,
+ 				    "%s: changing to %d not supported\n",
+@@ -1254,13 +1250,6 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 				return -EFAULT;
+ 			return mwifiex_change_vif_to_ap(dev, curr_iftype, type,
+ 							params);
+-		case NL80211_IFTYPE_UNSPECIFIED:
+-			mwifiex_dbg(priv->adapter, INFO,
+-				    "%s: kept type as P2P\n", dev->name);
+-			fallthrough;
+-		case NL80211_IFTYPE_P2P_CLIENT:
+-		case NL80211_IFTYPE_P2P_GO:
+-			return 0;
+ 		default:
+ 			mwifiex_dbg(priv->adapter, ERROR,
+ 				    "%s: changing to %d not supported\n",
+-- 
+2.31.0
+
+From 882f2a34be5af2acc00b09dfce185896e6ac8dc8 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
+ is allowed
+
+Instead of bailing out in the function which is supposed to do the type
+change, detect invalid changes beforehand using a generic function and
+return an error if the change is not allowed.
+
+Patchset: wifi
+---
+ .../net/wireless/marvell/mwifiex/cfg80211.c   | 139 ++++++++++++------
+ 1 file changed, 92 insertions(+), 47 deletions(-)
+
+diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+index d50fd8570475..3a79a55bbfd2 100644
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+@@ -939,6 +939,76 @@ mwifiex_init_new_priv_params(struct mwifiex_private *priv,
+ 	return 0;
+ }
  
-+	/* Allow ps_mode to be enabled only when allow_ps_mode is true */
-+	if (ps_mode && !allow_ps_mode) {
-+		mwifiex_dbg(priv->adapter, MSG,
-+			    "Enabling ps_mode disallowed by modparam\n");
++static bool
++is_vif_type_change_allowed(struct mwifiex_adapter *adapter,
++			   enum nl80211_iftype old_iftype,
++			   enum nl80211_iftype new_iftype)
++{
++	switch (old_iftype) {
++	case NL80211_IFTYPE_ADHOC:
++		switch (new_iftype) {
++		case NL80211_IFTYPE_STATION:
++			return true;
++		case NL80211_IFTYPE_P2P_CLIENT:
++		case NL80211_IFTYPE_P2P_GO:
++			return adapter->curr_iface_comb.p2p_intf !=
++			       adapter->iface_limit.p2p_intf;
++		case NL80211_IFTYPE_AP:
++			return adapter->curr_iface_comb.uap_intf !=
++			       adapter->iface_limit.uap_intf;
++		default:
++			return false;
++		}
 +
-+		/* Return -EPERM to inform userspace tools that setting
-+		 * power_save to be enabled is not permitted.
-+		 */
-+		return -EPERM;
++	case NL80211_IFTYPE_STATION:
++		switch (new_iftype) {
++		case NL80211_IFTYPE_ADHOC:
++			return true;
++		case NL80211_IFTYPE_P2P_CLIENT:
++		case NL80211_IFTYPE_P2P_GO:
++			return adapter->curr_iface_comb.p2p_intf !=
++			       adapter->iface_limit.p2p_intf;
++		case NL80211_IFTYPE_AP:
++			return adapter->curr_iface_comb.uap_intf !=
++			       adapter->iface_limit.uap_intf;
++		default:
++			return false;
++		}
++
++	case NL80211_IFTYPE_AP:
++		switch (new_iftype) {
++		case NL80211_IFTYPE_ADHOC:
++		case NL80211_IFTYPE_STATION:
++			return adapter->curr_iface_comb.sta_intf !=
++			       adapter->iface_limit.sta_intf;
++		case NL80211_IFTYPE_P2P_CLIENT:
++		case NL80211_IFTYPE_P2P_GO:
++			return adapter->curr_iface_comb.p2p_intf !=
++			       adapter->iface_limit.p2p_intf;
++		default:
++			return false;
++		}
++
++	case NL80211_IFTYPE_P2P_CLIENT:
++	case NL80211_IFTYPE_P2P_GO:
++		switch (new_iftype) {
++		case NL80211_IFTYPE_ADHOC:
++		case NL80211_IFTYPE_STATION:
++			return true;
++		case NL80211_IFTYPE_AP:
++			return adapter->curr_iface_comb.uap_intf !=
++			       adapter->iface_limit.uap_intf;
++		default:
++			return false;
++		}
++
++	default:
++		break;
 +	}
 +
- 	return mwifiex_drv_set_power(priv, &ps_mode);
++	return false;
++}
++
+ static int
+ mwifiex_change_vif_to_p2p(struct net_device *dev,
+ 			  enum nl80211_iftype curr_iftype,
+@@ -955,13 +1025,6 @@ mwifiex_change_vif_to_p2p(struct net_device *dev,
+ 
+ 	adapter = priv->adapter;
+ 
+-	if (adapter->curr_iface_comb.p2p_intf ==
+-	    adapter->iface_limit.p2p_intf) {
+-		mwifiex_dbg(adapter, ERROR,
+-			    "cannot create multiple P2P ifaces\n");
+-		return -1;
+-	}
+-
+ 	mwifiex_dbg(adapter, INFO,
+ 		    "%s: changing role to p2p\n", dev->name);
+ 
+@@ -1027,15 +1090,6 @@ mwifiex_change_vif_to_sta_adhoc(struct net_device *dev,
+ 
+ 	adapter = priv->adapter;
+ 
+-	if ((curr_iftype != NL80211_IFTYPE_P2P_CLIENT &&
+-	     curr_iftype != NL80211_IFTYPE_P2P_GO) &&
+-	    (adapter->curr_iface_comb.sta_intf ==
+-	     adapter->iface_limit.sta_intf)) {
+-		mwifiex_dbg(adapter, ERROR,
+-			    "cannot create multiple station/adhoc ifaces\n");
+-		return -1;
+-	}
+-
+ 	if (type == NL80211_IFTYPE_STATION)
+ 		mwifiex_dbg(adapter, INFO,
+ 			    "%s: changing role to station\n", dev->name);
+@@ -1086,13 +1140,6 @@ mwifiex_change_vif_to_ap(struct net_device *dev,
+ 
+ 	adapter = priv->adapter;
+ 
+-	if (adapter->curr_iface_comb.uap_intf ==
+-	    adapter->iface_limit.uap_intf) {
+-		mwifiex_dbg(adapter, ERROR,
+-			    "cannot create multiple AP ifaces\n");
+-		return -1;
+-	}
+-
+ 	mwifiex_dbg(adapter, INFO,
+ 		    "%s: changing role to AP\n", dev->name);
+ 
+@@ -1155,6 +1202,13 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 		return 0;
+ 	}
+ 
++	if (!is_vif_type_change_allowed(priv->adapter, curr_iftype, type)) {
++		mwifiex_dbg(priv->adapter, ERROR,
++			    "%s: change from type %d to %d is not allowed\n",
++			    dev->name, curr_iftype, type);
++		return -EOPNOTSUPP;
++	}
++
+ 	switch (curr_iftype) {
+ 	case NL80211_IFTYPE_ADHOC:
+ 		switch (type) {
+@@ -1175,12 +1229,9 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 			return mwifiex_change_vif_to_ap(dev, curr_iftype, type,
+ 							params);
+ 		default:
+-			mwifiex_dbg(priv->adapter, ERROR,
+-				    "%s: changing to %d not supported\n",
+-				    dev->name, type);
+-			return -EOPNOTSUPP;
++			goto errnotsupp;
+ 		}
+-		break;
++
+ 	case NL80211_IFTYPE_STATION:
+ 		switch (type) {
+ 		case NL80211_IFTYPE_ADHOC:
+@@ -1200,12 +1251,9 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 			return mwifiex_change_vif_to_ap(dev, curr_iftype, type,
+ 							params);
+ 		default:
+-			mwifiex_dbg(priv->adapter, ERROR,
+-				    "%s: changing to %d not supported\n",
+-				    dev->name, type);
+-			return -EOPNOTSUPP;
++			goto errnotsupp;
+ 		}
+-		break;
++
+ 	case NL80211_IFTYPE_AP:
+ 		switch (type) {
+ 		case NL80211_IFTYPE_ADHOC:
+@@ -1217,12 +1265,9 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 			return mwifiex_change_vif_to_p2p(dev, curr_iftype,
+ 							 type, params);
+ 		default:
+-			mwifiex_dbg(priv->adapter, ERROR,
+-				    "%s: changing to %d not supported\n",
+-				    dev->name, type);
+-			return -EOPNOTSUPP;
++			goto errnotsupp;
+ 		}
+-		break;
++
+ 	case NL80211_IFTYPE_P2P_CLIENT:
+ 	case NL80211_IFTYPE_P2P_GO:
+ 		switch (type) {
+@@ -1251,21 +1296,21 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 			return mwifiex_change_vif_to_ap(dev, curr_iftype, type,
+ 							params);
+ 		default:
+-			mwifiex_dbg(priv->adapter, ERROR,
+-				    "%s: changing to %d not supported\n",
+-				    dev->name, type);
+-			return -EOPNOTSUPP;
++			goto errnotsupp;
+ 		}
+-		break;
++
+ 	default:
+-		mwifiex_dbg(priv->adapter, ERROR,
+-			    "%s: unknown iftype: %d\n",
+-			    dev->name, dev->ieee80211_ptr->iftype);
+-		return -EOPNOTSUPP;
++		goto errnotsupp;
+ 	}
+ 
+ 
+ 	return 0;
++
++errnotsupp:
++	mwifiex_dbg(priv->adapter, ERROR,
++		    "unsupported interface type transition: %d to %d\n",
++		    curr_iftype, type);
++	return -EOPNOTSUPP;
  }
  
+ static void
 -- 
-2.30.2
+2.31.0
+
+From 16e5d900602b5f7f880ab242c2edafed14631206 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
+ vif-type
+
+We currently handle changing from the P2P to the STATION virtual
+interface type slightly different than changing from P2P to ADHOC: When
+changing to STATION, we don't send the SET_BSS_MODE command. We do send
+that command on all other type-changes though, and it probably makes
+sense to send the command since after all we just changed our BSS_MODE.
+Looking at prior changes to this part of the code, it seems that this is
+simply a leftover from old refactorings.
+
+Since sending the SET_BSS_MODE command is the only difference between
+mwifiex_change_vif_to_sta_adhoc() and the current code, we can now use
+mwifiex_change_vif_to_sta_adhoc() for both switching to ADHOC and
+STATION interface type.
+
+This does not fix any particular bug and just "looked right", so there's
+a small chance it might be a regression.
 
-From 622533c3eab640f8f21e5681625ee3f112fd68cb Mon Sep 17 00:00:00 2001
-From: Tsuchiya Yuto <kitakar@gmail.com>
-Date: Sun, 4 Oct 2020 00:38:48 +0900
-Subject: [PATCH] mwifiex: print message when changing ps_mode
+Patchset: wifi
+---
+ .../net/wireless/marvell/mwifiex/cfg80211.c   | 22 ++++---------------
+ 1 file changed, 4 insertions(+), 18 deletions(-)
+
+diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+index 3a79a55bbfd2..66e978088061 100644
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+@@ -1270,29 +1270,15 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 
+ 	case NL80211_IFTYPE_P2P_CLIENT:
+ 	case NL80211_IFTYPE_P2P_GO:
++		if (mwifiex_cfg80211_deinit_p2p(priv))
++			return -EFAULT;
++
+ 		switch (type) {
+-		case NL80211_IFTYPE_STATION:
+-			if (mwifiex_cfg80211_deinit_p2p(priv))
+-				return -EFAULT;
+-			priv->adapter->curr_iface_comb.p2p_intf--;
+-			priv->adapter->curr_iface_comb.sta_intf++;
+-			dev->ieee80211_ptr->iftype = type;
+-			if (mwifiex_deinit_priv_params(priv))
+-				return -1;
+-			if (mwifiex_init_new_priv_params(priv, dev, type))
+-				return -1;
+-			if (mwifiex_sta_init_cmd(priv, false, false))
+-				return -1;
+-			break;
+ 		case NL80211_IFTYPE_ADHOC:
+-			if (mwifiex_cfg80211_deinit_p2p(priv))
+-				return -EFAULT;
++		case NL80211_IFTYPE_STATION:
+ 			return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype,
+ 							       type, params);
+-			break;
+ 		case NL80211_IFTYPE_AP:
+-			if (mwifiex_cfg80211_deinit_p2p(priv))
+-				return -EFAULT;
+ 			return mwifiex_change_vif_to_ap(dev, curr_iftype, type,
+ 							params);
+ 		default:
+-- 
+2.31.0
 
-Users may want to know the ps_mode state change (e.g., diagnosing
-connection issues). This commit adds the print when changing ps_mode.
+From 5ad3936d5331288e7c0e50d9b6d591c34cc5186b 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
+
+Use a small helper function to increment and decrement the counter of
+the interface types we currently manage. This makes the code that
+actually changes and sets up the interface type a bit less messy and
+also helps avoiding mistakes in case someone increments/decrements a
+counter wrongly.
 
-Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com>
 Patchset: wifi
 ---
- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 7 +++++++
- 1 file changed, 7 insertions(+)
+ .../net/wireless/marvell/mwifiex/cfg80211.c   | 110 ++++++------------
+ 1 file changed, 35 insertions(+), 75 deletions(-)
 
 diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
-index 943bc1e8ceae..a2eb8df8d385 100644
+index 66e978088061..db30f595e9f9 100644
 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
 +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
-@@ -451,6 +451,13 @@ mwifiex_cfg80211_set_power_mgmt(struct wiphy *wiphy,
- 		return -EPERM;
- 	}
+@@ -1009,6 +1009,32 @@ is_vif_type_change_allowed(struct mwifiex_adapter *adapter,
+ 	return false;
+ }
  
-+	if (ps_mode)
-+		mwifiex_dbg(priv->adapter, MSG,
-+			    "Enabling ps_mode, disable if unstable.\n");
-+	else
-+		mwifiex_dbg(priv->adapter, MSG,
-+			    "Disabling ps_mode.\n");
++static void
++update_vif_type_counter(struct mwifiex_adapter *adapter,
++			enum nl80211_iftype iftype,
++			int change)
++{
++	switch (iftype) {
++	case NL80211_IFTYPE_UNSPECIFIED:
++	case NL80211_IFTYPE_ADHOC:
++	case NL80211_IFTYPE_STATION:
++		adapter->curr_iface_comb.sta_intf += change;
++		break;
++	case NL80211_IFTYPE_AP:
++		adapter->curr_iface_comb.uap_intf += change;
++		break;
++	case NL80211_IFTYPE_P2P_CLIENT:
++	case NL80211_IFTYPE_P2P_GO:
++		adapter->curr_iface_comb.p2p_intf += change;
++		break;
++	default:
++		mwifiex_dbg(adapter, ERROR,
++			    "%s: Unsupported iftype passed: %d\n",
++			    __func__, iftype);
++		break;
++	}
++}
 +
- 	return mwifiex_drv_set_power(priv, &ps_mode);
+ static int
+ mwifiex_change_vif_to_p2p(struct net_device *dev,
+ 			  enum nl80211_iftype curr_iftype,
+@@ -1056,19 +1082,8 @@ mwifiex_change_vif_to_p2p(struct net_device *dev,
+ 	if (mwifiex_sta_init_cmd(priv, false, false))
+ 		return -1;
+ 
+-	switch (curr_iftype) {
+-	case NL80211_IFTYPE_STATION:
+-	case NL80211_IFTYPE_ADHOC:
+-		adapter->curr_iface_comb.sta_intf--;
+-		break;
+-	case NL80211_IFTYPE_AP:
+-		adapter->curr_iface_comb.uap_intf--;
+-		break;
+-	default:
+-		break;
+-	}
+-
+-	adapter->curr_iface_comb.p2p_intf++;
++	update_vif_type_counter(adapter, curr_iftype, -1);
++	update_vif_type_counter(adapter, type, +1);
+ 	dev->ieee80211_ptr->iftype = type;
+ 
+ 	return 0;
+@@ -1107,20 +1122,10 @@ mwifiex_change_vif_to_sta_adhoc(struct net_device *dev,
+ 	if (mwifiex_sta_init_cmd(priv, false, false))
+ 		return -1;
+ 
+-	switch (curr_iftype) {
+-	case NL80211_IFTYPE_P2P_CLIENT:
+-	case NL80211_IFTYPE_P2P_GO:
+-		adapter->curr_iface_comb.p2p_intf--;
+-		break;
+-	case NL80211_IFTYPE_AP:
+-		adapter->curr_iface_comb.uap_intf--;
+-		break;
+-	default:
+-		break;
+-	}
+-
+-	adapter->curr_iface_comb.sta_intf++;
++	update_vif_type_counter(adapter, curr_iftype, -1);
++	update_vif_type_counter(adapter, type, +1);
+ 	dev->ieee80211_ptr->iftype = type;
++
+ 	return 0;
  }
  
+@@ -1153,20 +1158,8 @@ mwifiex_change_vif_to_ap(struct net_device *dev,
+ 	if (mwifiex_sta_init_cmd(priv, false, false))
+ 		return -1;
+ 
+-	switch (curr_iftype) {
+-	case NL80211_IFTYPE_P2P_CLIENT:
+-	case NL80211_IFTYPE_P2P_GO:
+-		adapter->curr_iface_comb.p2p_intf--;
+-		break;
+-	case NL80211_IFTYPE_STATION:
+-	case NL80211_IFTYPE_ADHOC:
+-		adapter->curr_iface_comb.sta_intf--;
+-		break;
+-	default:
+-		break;
+-	}
+-
+-	adapter->curr_iface_comb.uap_intf++;
++	update_vif_type_counter(adapter, curr_iftype, -1);
++	update_vif_type_counter(adapter, type, +1);
+ 	dev->ieee80211_ptr->iftype = type;
+ 	return 0;
+ }
+@@ -3114,23 +3107,7 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy,
+ 	mwifiex_dev_debugfs_init(priv);
+ #endif
+ 
+-	switch (type) {
+-	case NL80211_IFTYPE_UNSPECIFIED:
+-	case NL80211_IFTYPE_STATION:
+-	case NL80211_IFTYPE_ADHOC:
+-		adapter->curr_iface_comb.sta_intf++;
+-		break;
+-	case NL80211_IFTYPE_AP:
+-		adapter->curr_iface_comb.uap_intf++;
+-		break;
+-	case NL80211_IFTYPE_P2P_CLIENT:
+-		adapter->curr_iface_comb.p2p_intf++;
+-		break;
+-	default:
+-		/* This should be dead code; checked above */
+-		mwifiex_dbg(adapter, ERROR, "type not supported\n");
+-		return ERR_PTR(-EINVAL);
+-	}
++	update_vif_type_counter(adapter, type, +1);
+ 
+ 	return &priv->wdev;
+ 
+@@ -3196,24 +3173,7 @@ int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
+ 	/* Clear the priv in adapter */
+ 	priv->netdev = NULL;
+ 
+-	switch (priv->bss_mode) {
+-	case NL80211_IFTYPE_UNSPECIFIED:
+-	case NL80211_IFTYPE_STATION:
+-	case NL80211_IFTYPE_ADHOC:
+-		adapter->curr_iface_comb.sta_intf--;
+-		break;
+-	case NL80211_IFTYPE_AP:
+-		adapter->curr_iface_comb.uap_intf--;
+-		break;
+-	case NL80211_IFTYPE_P2P_CLIENT:
+-	case NL80211_IFTYPE_P2P_GO:
+-		adapter->curr_iface_comb.p2p_intf--;
+-		break;
+-	default:
+-		mwifiex_dbg(adapter, ERROR,
+-			    "del_virtual_intf: type not supported\n");
+-		break;
+-	}
++	update_vif_type_counter(adapter, priv->bss_mode, -1);
+ 
+ 	priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED;
+ 
 -- 
-2.30.2
+2.31.0
+
+From 4729044609a3209483abc7e897c460b075a78db3 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
+ setting bss_type
+
+In mwifiex_init_new_priv_params() we update our private driver state to
+reflect the currently selected virtual interface type. Most notably we
+set the bss_mode to the mode we're going to put the firmware in.
+
+Now after we updated the driver state we actually start talking to the
+firmware and instruct it to set up the new mode. Those commands can and
+will sometimes fail, in which case we return with an error from
+mwifiex_change_vif_to_*. We currently update our virtual interface type
+counters after this return, which means the code is never reached when a
+firmware error happens and we never update the counters. Since we have
+updated our bss_mode earlier though, the counters now no longer reflect
+the actual state of the driver.
+
+This will break things on the next virtual interface change, because the
+virtual interface type we're switching away from didn't get its counter
+incremented, and we end up decrementing a 0-counter.
+
+To fix this, simply update the virtual interface type counters right
+after updating our driver structures, so that they are always in sync.
 
-From c21851303336b80cfe4166a3c2b5a4a0b764b217 Mon Sep 17 00:00:00 2001
-From: Tsuchiya Yuto <kitakar@gmail.com>
-Date: Sun, 4 Oct 2020 00:59:37 +0900
-Subject: [PATCH] mwifiex: disable ps_mode explicitly by default instead
+Patchset: wifi
+---
+ .../net/wireless/marvell/mwifiex/cfg80211.c   | 25 +++++++++++--------
+ 1 file changed, 14 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+index db30f595e9f9..60de1cec77c7 100644
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+@@ -1059,6 +1059,10 @@ mwifiex_change_vif_to_p2p(struct net_device *dev,
+ 	if (mwifiex_init_new_priv_params(priv, dev, type))
+ 		return -1;
+ 
++	update_vif_type_counter(adapter, curr_iftype, -1);
++	update_vif_type_counter(adapter, type, +1);
++	dev->ieee80211_ptr->iftype = type;
++
+ 	switch (type) {
+ 	case NL80211_IFTYPE_P2P_CLIENT:
+ 		if (mwifiex_cfg80211_init_p2p_client(priv))
+@@ -1082,10 +1086,6 @@ mwifiex_change_vif_to_p2p(struct net_device *dev,
+ 	if (mwifiex_sta_init_cmd(priv, false, false))
+ 		return -1;
+ 
+-	update_vif_type_counter(adapter, curr_iftype, -1);
+-	update_vif_type_counter(adapter, type, +1);
+-	dev->ieee80211_ptr->iftype = type;
+-
+ 	return 0;
+ }
+ 
+@@ -1116,16 +1116,17 @@ mwifiex_change_vif_to_sta_adhoc(struct net_device *dev,
+ 		return -1;
+ 	if (mwifiex_init_new_priv_params(priv, dev, type))
+ 		return -1;
++
++	update_vif_type_counter(adapter, curr_iftype, -1);
++	update_vif_type_counter(adapter, type, +1);
++	dev->ieee80211_ptr->iftype = type;
++
+ 	if (mwifiex_send_cmd(priv, HostCmd_CMD_SET_BSS_MODE,
+ 			     HostCmd_ACT_GEN_SET, 0, NULL, true))
+ 		return -1;
+ 	if (mwifiex_sta_init_cmd(priv, false, false))
+ 		return -1;
+ 
+-	update_vif_type_counter(adapter, curr_iftype, -1);
+-	update_vif_type_counter(adapter, type, +1);
+-	dev->ieee80211_ptr->iftype = type;
+-
+ 	return 0;
+ }
+ 
+@@ -1152,15 +1153,17 @@ mwifiex_change_vif_to_ap(struct net_device *dev,
+ 		return -1;
+ 	if (mwifiex_init_new_priv_params(priv, dev, type))
+ 		return -1;
++
++	update_vif_type_counter(adapter, curr_iftype, -1);
++	update_vif_type_counter(adapter, type, +1);
++	dev->ieee80211_ptr->iftype = type;
++
+ 	if (mwifiex_send_cmd(priv, HostCmd_CMD_SET_BSS_MODE,
+ 			     HostCmd_ACT_GEN_SET, 0, NULL, true))
+ 		return -1;
+ 	if (mwifiex_sta_init_cmd(priv, false, false))
+ 		return -1;
+ 
+-	update_vif_type_counter(adapter, curr_iftype, -1);
+-	update_vif_type_counter(adapter, type, +1);
+-	dev->ieee80211_ptr->iftype = type;
+ 	return 0;
+ }
+ /*
+-- 
+2.31.0
 
-At least on Surface devices, the ps_mode causes connection unstable,
-especially with 5GHz APs. Then, it eventually causes fw crashing.
+From aa08f9c7c64ec242910c51de7069a2af6b18bc4e 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
+ P2P_GO
 
-This commit disables ps_mode by default instead of enabling it.
+It's possible to change virtual interface type between P2P_CLIENT and
+P2P_GO, the card supports that just fine, and it happens for example
+when using miracast with the miraclecast software.
 
-Required code is extracted from mwifiex_drv_set_power().
+So allow type changes between P2P_CLIENT and P2P_GO and simply call into
+mwifiex_change_vif_to_p2p(), which handles this just fine. We have to
+call mwifiex_cfg80211_deinit_p2p() before though to make sure the old
+p2p mode is properly uninitialized.
 
-Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com>
 Patchset: wifi
 ---
- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
-index d3a968ef21ef..9b7b52fbc9c4 100644
---- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
-+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
-@@ -2333,14 +2333,19 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta, bool init)
- 			return -1;
- 
- 		if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) {
--			/* Enable IEEE PS by default */
--			priv->adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_PSP;
-+			/* Disable IEEE PS by default */
-+			priv->adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_CAM;
- 			ret = mwifiex_send_cmd(priv,
- 					       HostCmd_CMD_802_11_PS_MODE_ENH,
--					       EN_AUTO_PS, BITMAP_STA_PS, NULL,
-+					       DIS_AUTO_PS, BITMAP_STA_PS, NULL,
- 					       true);
- 			if (ret)
- 				return -1;
-+			ret = mwifiex_send_cmd(priv,
-+					       HostCmd_CMD_802_11_PS_MODE_ENH,
-+					       GET_PS, 0, NULL, false);
-+			if (ret)
-+				return -1;
+ .../net/wireless/marvell/mwifiex/cfg80211.c   | 36 +++++++++++++++++++
+ 1 file changed, 36 insertions(+)
+
+diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+index 60de1cec77c7..a37b504bd084 100644
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+@@ -990,11 +990,26 @@ is_vif_type_change_allowed(struct mwifiex_adapter *adapter,
  		}
  
- 		if (drcs) {
+ 	case NL80211_IFTYPE_P2P_CLIENT:
++		switch (new_iftype) {
++		case NL80211_IFTYPE_ADHOC:
++		case NL80211_IFTYPE_STATION:
++			return true;
++		case NL80211_IFTYPE_P2P_GO:
++			return true;
++		case NL80211_IFTYPE_AP:
++			return adapter->curr_iface_comb.uap_intf !=
++			       adapter->iface_limit.uap_intf;
++		default:
++			return false;
++		}
++
+ 	case NL80211_IFTYPE_P2P_GO:
+ 		switch (new_iftype) {
+ 		case NL80211_IFTYPE_ADHOC:
+ 		case NL80211_IFTYPE_STATION:
+ 			return true;
++		case NL80211_IFTYPE_P2P_CLIENT:
++			return true;
+ 		case NL80211_IFTYPE_AP:
+ 			return adapter->curr_iface_comb.uap_intf !=
+ 			       adapter->iface_limit.uap_intf;
+@@ -1265,6 +1280,24 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 		}
+ 
+ 	case NL80211_IFTYPE_P2P_CLIENT:
++		if (mwifiex_cfg80211_deinit_p2p(priv))
++			return -EFAULT;
++
++		switch (type) {
++		case NL80211_IFTYPE_ADHOC:
++		case NL80211_IFTYPE_STATION:
++			return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype,
++							       type, params);
++		case NL80211_IFTYPE_P2P_GO:
++			return mwifiex_change_vif_to_p2p(dev, curr_iftype,
++							 type, params);
++		case NL80211_IFTYPE_AP:
++			return mwifiex_change_vif_to_ap(dev, curr_iftype, type,
++							params);
++		default:
++			goto errnotsupp;
++		}
++
+ 	case NL80211_IFTYPE_P2P_GO:
+ 		if (mwifiex_cfg80211_deinit_p2p(priv))
+ 			return -EFAULT;
+@@ -1274,6 +1307,9 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 		case NL80211_IFTYPE_STATION:
+ 			return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype,
+ 							       type, params);
++		case NL80211_IFTYPE_P2P_CLIENT:
++			return mwifiex_change_vif_to_p2p(dev, curr_iftype,
++							 type, params);
+ 		case NL80211_IFTYPE_AP:
+ 			return mwifiex_change_vif_to_ap(dev, curr_iftype, type,
+ 							params);
+-- 
+2.31.0
+
+From 5b3a46e78fc373076e4727fde5aa6cdc1dcf8cc5 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
+
+Looks like this case was simply overseen, so handle it, too.
+
+Patchset: wifi
+---
+ drivers/net/wireless/marvell/mwifiex/cfg80211.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+index a37b504bd084..e65f285e3efe 100644
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+@@ -1268,6 +1268,7 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
+ 	case NL80211_IFTYPE_AP:
+ 		switch (type) {
+ 		case NL80211_IFTYPE_ADHOC:
++		case NL80211_IFTYPE_STATION:
+ 			return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype,
+ 							       type, params);
+ 			break;
+-- 
+2.31.0
+
+From 14cde4e6a7bcbd21b1180f4c2ae81a3483eb2506 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
+ type changes
+
+When creating a new virtual interface in mwifiex_add_virtual_intf(), we
+update our internal driver states like bss_type, bss_priority, bss_role
+and bss_mode to reflect the mode the firmware will be set to.
+
+When switching virtual interface mode using
+mwifiex_init_new_priv_params() though, we currently only update bss_mode
+and bss_role. In order for the interface mode switch to actually work,
+we also need to update bss_type to its proper value, so do that.
+
+This fixes a crash of the firmware (because the driver tries to execute
+commands that are invalid in AP mode) when switching from station mode
+to AP mode.
+
+Patchset: wifi
+---
+ drivers/net/wireless/marvell/mwifiex/cfg80211.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+index e65f285e3efe..a290312313f3 100644
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+@@ -908,16 +908,20 @@ mwifiex_init_new_priv_params(struct mwifiex_private *priv,
+ 	switch (type) {
+ 	case NL80211_IFTYPE_STATION:
+ 	case NL80211_IFTYPE_ADHOC:
+-		priv->bss_role =  MWIFIEX_BSS_ROLE_STA;
++		priv->bss_role = MWIFIEX_BSS_ROLE_STA;
++		priv->bss_type = MWIFIEX_BSS_TYPE_STA;
+ 		break;
+ 	case NL80211_IFTYPE_P2P_CLIENT:
+-		priv->bss_role =  MWIFIEX_BSS_ROLE_STA;
++		priv->bss_role = MWIFIEX_BSS_ROLE_STA;
++		priv->bss_type = MWIFIEX_BSS_TYPE_P2P;
+ 		break;
+ 	case NL80211_IFTYPE_P2P_GO:
+-		priv->bss_role =  MWIFIEX_BSS_ROLE_UAP;
++		priv->bss_role = MWIFIEX_BSS_ROLE_UAP;
++		priv->bss_type = MWIFIEX_BSS_TYPE_P2P;
+ 		break;
+ 	case NL80211_IFTYPE_AP:
+ 		priv->bss_role = MWIFIEX_BSS_ROLE_UAP;
++		priv->bss_type = MWIFIEX_BSS_TYPE_UAP;
+ 		break;
+ 	default:
+ 		mwifiex_dbg(adapter, ERROR,
+-- 
+2.31.0
+
+From e34db05440a4b4f24627e6beee4d59e2d3211c56 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
+ interface
+
+The BSS priority here for a new P2P_CLIENT device was accidentally set
+to an enum that's certainly not meant for this. Since
+MWIFIEX_BSS_ROLE_STA is 0 anyway, we can just set the bss_priority to 0
+instead here.
+
+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 a290312313f3..1e1cf523e228 100644
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+@@ -3040,7 +3040,7 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy,
+ 		priv->bss_type = MWIFIEX_BSS_TYPE_P2P;
+ 
+ 		priv->frame_type = MWIFIEX_DATA_FRAME_TYPE_ETH_II;
+-		priv->bss_priority = MWIFIEX_BSS_ROLE_STA;
++		priv->bss_priority = 0;
+ 		priv->bss_role = MWIFIEX_BSS_ROLE_STA;
+ 		priv->bss_started = 0;
+ 
 -- 
-2.30.2
+2.31.0
 

+ 6 - 6
patches/5.10/0003-ipts.patch

@@ -1,4 +1,4 @@
-From 90e1d7db373353485b576401393603531e19e5b7 Mon Sep 17 00:00:00 2001
+From aa02462a79f4fd4c9eadf761cd0e4e14684e3e10 Mon Sep 17 00:00:00 2001
 From: Dorian Stoll <dorian.stoll@tmsp.io>
 Date: Thu, 30 Jul 2020 13:21:53 +0200
 Subject: [PATCH] misc: mei: Add missing IPTS device IDs
@@ -34,9 +34,9 @@ index a7e179626b63..fdcc0eedc49f 100644
  	{MEI_PCI_DEVICE(MEI_DEV_ID_TGP_LP, MEI_ME_PCH15_CFG)},
  	{MEI_PCI_DEVICE(MEI_DEV_ID_TGP_H, MEI_ME_PCH15_SPS_CFG)},
 -- 
-2.30.2
+2.31.0
 
-From 6e108530058a5bcdce66b4876e4d2df2857886a9 Mon Sep 17 00:00:00 2001
+From 29e1b97965fcaee3a92691a35dbab73a2d7fda00 Mon Sep 17 00:00:00 2001
 From: Dorian Stoll <dorian.stoll@tmsp.io>
 Date: Thu, 25 Feb 2021 09:37:47 +0100
 Subject: [PATCH] misc: mei: Remove client devices before shutting down bus
@@ -63,9 +63,9 @@ index bcee77768b91..21ed765003e1 100644
  	mei_cancel_work(dev);
  
 -- 
-2.30.2
+2.31.0
 
-From 808625970ba4458fac3b968aca422dd7109dd3fb Mon Sep 17 00:00:00 2001
+From ddba8b4be1e5a0109fd370853ac4cdf60d702d03 Mon Sep 17 00:00:00 2001
 From: Dorian Stoll <dorian.stoll@tmsp.io>
 Date: Thu, 6 Aug 2020 11:20:41 +0200
 Subject: [PATCH] misc: Add support for Intel Precise Touch & Stylus
@@ -1530,5 +1530,5 @@ index 000000000000..53fb86a88f97
 +
 +#endif /* _IPTS_UAPI_H_ */
 -- 
-2.30.2
+2.31.0
 

+ 2 - 2
patches/5.10/0004-surface-gpe.patch

@@ -1,4 +1,4 @@
-From 52a8c0bfb4c8aa190c8785896aca7b60e07433bb Mon Sep 17 00:00:00 2001
+From 6203e6b05b6400765c3b60bc9abc6f51d0174d2b Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Sun, 16 Aug 2020 23:39:56 +0200
 Subject: [PATCH] platform/x86: Add Driver to set up lid GPEs on MS Surface
@@ -397,5 +397,5 @@ index 000000000000..86f6991b1215
 +MODULE_LICENSE("GPL");
 +MODULE_ALIAS("dmi:*:svnMicrosoftCorporation:pnSurface*:*");
 -- 
-2.30.2
+2.31.0
 

+ 4 - 4
patches/5.10/0005-surface-sam-over-hid.patch

@@ -1,4 +1,4 @@
-From 66e611f6ae6b9242f57c88c986bd64d36b9c5c9c Mon Sep 17 00:00:00 2001
+From 6afdbc10e27f77058863a613847ed95330d2f7a9 Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Sat, 25 Jul 2020 17:19:53 +0200
 Subject: [PATCH] i2c: acpi: Implement RawBytes read access
@@ -108,9 +108,9 @@ index 37c510d9347a..aed579942436 100644
  		dev_warn(&adapter->dev, "protocol 0x%02x not supported for client 0x%02x\n",
  			 accessor_type, client->addr);
 -- 
-2.30.2
+2.31.0
 
-From f222c16f529991ea37c30eb8230eaffd697f5c35 Mon Sep 17 00:00:00 2001
+From 37c1b8aae895de51aa6b43c74b75bf8e3d09bf57 Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Sun, 6 Sep 2020 04:01:19 +0200
 Subject: [PATCH] platform/x86: Add driver for Surface Book 1 dGPU switch
@@ -331,5 +331,5 @@ index 000000000000..8c66ed5110fd
 +MODULE_DESCRIPTION("Discrete GPU Power-Switch for Surface Book 1");
 +MODULE_LICENSE("GPL");
 -- 
-2.30.2
+2.31.0
 

+ 4 - 4
patches/5.10/0006-surface-sam.patch

@@ -1,4 +1,4 @@
-From 2e5706ef401f67d7c18ceeae4bdac24a85c1376a Mon Sep 17 00:00:00 2001
+From 1e45c96cb187b063c54121bf6264c7bd8556a37f Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Mon, 17 Aug 2020 01:23:20 +0200
 Subject: [PATCH] Add file2alias support for Surface Aggregator Module devices
@@ -97,9 +97,9 @@ index 2417dd1dee33..a6c583362b92 100644
  
  /* Create MODULE_ALIAS() statements.
 -- 
-2.30.2
+2.31.0
 
-From 3814d8f09548e0c8095c3518070c84b16f7b0db5 Mon Sep 17 00:00:00 2001
+From fd3ac86b1fad9c4ebea6cf58c9192c69471354fb Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Mon, 17 Aug 2020 01:44:30 +0200
 Subject: [PATCH] platform/x86: Add support for Surface System Aggregator
@@ -19879,5 +19879,5 @@ index a6c583362b92..5b79fdc42641 100644
  	ADD(alias, "f", match_flags & SSAM_MATCH_FUNCTION, function);
  
 -- 
-2.30.2
+2.31.0
 

+ 6 - 6
patches/5.10/0007-surface-hotplug.patch

@@ -1,4 +1,4 @@
-From 70f0ac1d40842811ee6a651ea90fcb9c7db839ba Mon Sep 17 00:00:00 2001
+From b3c054a53fb7a9d4ce5a3d8e8122300a47eb2b71 Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Sat, 31 Oct 2020 20:46:33 +0100
 Subject: [PATCH] PCI: Add sysfs attribute for PCI device power state
@@ -69,9 +69,9 @@ index d15c881e2e7e..b15f754e6346 100644
  	&dev_attr_vendor.attr,
  	&dev_attr_device.attr,
 -- 
-2.30.2
+2.31.0
 
-From 4cadaf8a25e09cea64f738dc2ee21d37ddb7c71a Mon Sep 17 00:00:00 2001
+From 48c5b30c34cb86933e33ce81ce20571fccc7c00e Mon Sep 17 00:00:00 2001
 From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
 Date: Tue, 16 Mar 2021 16:51:40 +0100
 Subject: [PATCH] PCI: PM: Do not read power state in pci_enable_device_flags()
@@ -137,9 +137,9 @@ index 9e971fffeb6a..d5d9ea864fe6 100644
  	bridge = pci_upstream_bridge(dev);
  	if (bridge)
 -- 
-2.30.2
+2.31.0
 
-From 3d726739c948410ce0c89df3882b7c72e52c81f4 Mon Sep 17 00:00:00 2001
+From 465ebd8e50e7f01a604e47b89ac8089a3e4f88dd Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Mon, 14 Dec 2020 20:50:59 +0100
 Subject: [PATCH] platform/x86: Add Surface Hotplug driver
@@ -490,5 +490,5 @@ index 000000000000..cfcc15cfbacb
 +MODULE_DESCRIPTION("Surface Hot-Plug Signaling Driver for Surface Book Devices");
 +MODULE_LICENSE("GPL");
 -- 
-2.30.2
+2.31.0
 

+ 2 - 2
patches/5.10/0008-surface-typecover.patch

@@ -1,4 +1,4 @@
-From fef121feb36b821d7db0fb31578a661ed86c711d Mon Sep 17 00:00:00 2001
+From 7a13289d770aad5673a4675c76ea7b8eac63be5f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
 Date: Thu, 5 Nov 2020 13:09:45 +0100
 Subject: [PATCH] hid/multitouch: Turn off Type Cover keyboard backlight when
@@ -229,5 +229,5 @@ index 8429ebe7097e..44d48e8bbe1a 100644
  	{ .driver_data = MT_CLS_GOOGLE,
  		HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_GOOGLE,
 -- 
-2.30.2
+2.31.0
 

+ 2 - 2
patches/5.10/0009-surface-sensors.patch

@@ -1,4 +1,4 @@
-From 1b4c53bb78f044c7176e3a12780be490250c0535 Mon Sep 17 00:00:00 2001
+From 1cda5fca77f439459c1d117ebfdcb642017a5eb3 Mon Sep 17 00:00:00 2001
 From: Max Leiter <maxwell.leiter@gmail.com>
 Date: Sat, 19 Dec 2020 17:50:55 -0800
 Subject: [PATCH] iio:light:apds9960 add detection for MSHW0184 ACPI device in
@@ -49,5 +49,5 @@ index 9afb3fcc74e6..20719141c03a 100644
  	.probe		= apds9960_probe,
  	.remove		= apds9960_remove,
 -- 
-2.30.2
+2.31.0
 

+ 122 - 122
patches/5.10/0010-cameras.patch

@@ -1,4 +1,4 @@
-From d72d123e5be5e82e26085d42df691aebbcddfaad Mon Sep 17 00:00:00 2001
+From 4b953132c24fff81c2e6c05e3b96a4d4685e0712 Mon Sep 17 00:00:00 2001
 From: Sakari Ailus <sakari.ailus@linux.intel.com>
 Date: Mon, 12 Oct 2020 21:04:11 +0300
 Subject: [PATCH] ipu3-cio2: Use unsigned values where appropriate
@@ -314,9 +314,9 @@ index 146492383aa5..7650d7998a3f 100644
  
  struct cio2_csi2_timing {
 -- 
-2.30.2
+2.31.0
 
-From 6217d0133e41e1d51b5fb82185f494dd8e90162c Mon Sep 17 00:00:00 2001
+From ef8c72288f2eeddcf22b8bae85dc137e7ef83db2 Mon Sep 17 00:00:00 2001
 From: Sakari Ailus <sakari.ailus@linux.intel.com>
 Date: Mon, 12 Oct 2020 21:04:12 +0300
 Subject: [PATCH] ipu3-cio2: Remove explicit type from frame size checks
@@ -348,9 +348,9 @@ index dcbfe8c9abc7..a1f574095acc 100644
  
  	mutex_lock(&q->subdev_lock);
 -- 
-2.30.2
+2.31.0
 
-From 4133044087236b760c63d9a8fb89b2758247d17e Mon Sep 17 00:00:00 2001
+From 9b178e583c954600ecca2ce0430e889948017d73 Mon Sep 17 00:00:00 2001
 From: Sakari Ailus <sakari.ailus@linux.intel.com>
 Date: Mon, 12 Oct 2020 21:04:13 +0300
 Subject: [PATCH] ipu3-cio2: Rename CIO2_IMAGE_MAX_LENGTH as
@@ -407,9 +407,9 @@ index 7650d7998a3f..ccf0b85ae36f 100644
  /* 32MB = 8xFBPT_entry */
  #define CIO2_MAX_LOPS					8
 -- 
-2.30.2
+2.31.0
 
-From 5cf6da407e1dfe88b3eaac9ace68e1462e208740 Mon Sep 17 00:00:00 2001
+From c72cc6e047fff421d18352a90f4c20ebfe895efb Mon Sep 17 00:00:00 2001
 From: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
 Date: Tue, 13 Oct 2020 17:25:35 +0300
 Subject: [PATCH] ipu3-cio2: Check receved the size against payload size, not
@@ -461,9 +461,9 @@ index 93fd25a5a3e9..b244b9de142a 100644
  		}
  		atomic_inc(&q->frame_sequence);
 -- 
-2.30.2
+2.31.0
 
-From 3d47554facf6376e34ae572180cb4b8cc70aba53 Mon Sep 17 00:00:00 2001
+From 3af671dd435e9ee0c46743be2cd8761d3e7154c4 Mon Sep 17 00:00:00 2001
 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 Date: Wed, 30 Dec 2020 22:44:05 +0200
 Subject: [PATCH] media: ipu3-cio2: Add headers that ipu3-cio2.h is direct user
@@ -513,9 +513,9 @@ index ccf0b85ae36f..62187ab5ae43 100644
  #define CIO2_DEVICE_NAME				"Intel IPU3 CIO2"
  #define CIO2_ENTITY_NAME				"ipu3-csi2"
 -- 
-2.30.2
+2.31.0
 
-From 275fa695ac22c5a685b9389e25ae3533793cb310 Mon Sep 17 00:00:00 2001
+From 41ca118486619d34fffa3040f4cd767cdf20e9e3 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 24 Oct 2020 22:42:28 +0100
 Subject: [PATCH] device property: Return true in fwnode_device_is_available
@@ -558,9 +558,9 @@ index 4c43d30145c6..bc9c634df6df 100644
  }
  EXPORT_SYMBOL_GPL(fwnode_device_is_available);
 -- 
-2.30.2
+2.31.0
 
-From 1522480b676994101af9c65d71e30989ce855069 Mon Sep 17 00:00:00 2001
+From 358ec8b50ea17c3a279c855c6357ff35e989bc41 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 21 Nov 2020 22:06:38 +0000
 Subject: [PATCH] device property: Call fwnode_graph_get_endpoint_by_id() for
@@ -602,9 +602,9 @@ index bc9c634df6df..ddba75d90af2 100644
  EXPORT_SYMBOL_GPL(fwnode_graph_get_endpoint_by_id);
  
 -- 
-2.30.2
+2.31.0
 
-From 0f5895cb6da05230b00ed30996cfae0a091a8625 Mon Sep 17 00:00:00 2001
+From 952d517ab0b07ca48ec16bd73e080d5ab4139e0e Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sun, 25 Oct 2020 22:49:08 +0000
 Subject: [PATCH] software_node: Enforce parent before child ordering of nodes
@@ -705,9 +705,9 @@ index 206bd4d7d7e2..eb89bdb9232c 100644
  }
  EXPORT_SYMBOL_GPL(software_node_unregister_nodes);
 -- 
-2.30.2
+2.31.0
 
-From 153047d1b15ea36831c112983313064162db89a9 Mon Sep 17 00:00:00 2001
+From 36765edccfd75fc921405f8e0b1beb1448b9a683 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Wed, 21 Oct 2020 22:25:03 +0100
 Subject: [PATCH] software_node: unregister software_nodes in reverse order
@@ -760,9 +760,9 @@ index eb89bdb9232c..032b24f60c78 100644
  }
  EXPORT_SYMBOL_GPL(software_node_unregister_node_group);
 -- 
-2.30.2
+2.31.0
 
-From 4fce5d13b6ae6da3989b458536d44e29508bf87f Mon Sep 17 00:00:00 2001
+From 7318be9410a7d42eadbef6017370279a52bf9873 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Tue, 22 Dec 2020 13:09:05 +0000
 Subject: [PATCH] device property: Define format macros for ports and endpoints
@@ -801,9 +801,9 @@ index 9506f8ec0974..72d36d46287d 100644
  
  /**
 -- 
-2.30.2
+2.31.0
 
-From c116aeeae4f85cc7e7bc3c86a71cc0e2ca9e1a81 Mon Sep 17 00:00:00 2001
+From 4aad01ce9e2c47a9ddd75d6a9c4ace9ada5346aa Mon Sep 17 00:00:00 2001
 From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
 Date: Tue, 15 Sep 2020 15:47:46 +0100
 Subject: [PATCH] software_node: Add support for fwnode_graph*() family of
@@ -969,9 +969,9 @@ index 032b24f60c78..7f056c5e0ed3 100644
  
  /* -------------------------------------------------------------------------- */
 -- 
-2.30.2
+2.31.0
 
-From 2968996ab3cd314f91eac33a28b8308afba24e86 Mon Sep 17 00:00:00 2001
+From 0e94d9261add745a41d1fa850fd46ca679b423e9 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 10 Oct 2020 23:07:22 +0100
 Subject: [PATCH] lib/test_printf.c: Use helper function to unwind array of
@@ -1007,9 +1007,9 @@ index 7ac87f18a10f..7d60f24240a4 100644
  
  static void __init
 -- 
-2.30.2
+2.31.0
 
-From 486116facb419206ee895fe006cccc10a042a2b4 Mon Sep 17 00:00:00 2001
+From 3390b0fc367af331afc0bcef269b6542458d007f Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 10 Oct 2020 23:11:36 +0100
 Subject: [PATCH] ipu3-cio2: Add T: entry to MAINTAINERS
@@ -1026,10 +1026,10 @@ Patchset: cameras
  1 file changed, 1 insertion(+)
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 281de213ef47..5a1c6e959aa8 100644
+index 24cdfcf334ea..d15fa5b4558a 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -8938,6 +8938,7 @@ M:	Bingbu Cao <bingbu.cao@intel.com>
+@@ -8937,6 +8937,7 @@ M:	Bingbu Cao <bingbu.cao@intel.com>
  R:	Tianshu Qiu <tian.shu.qiu@intel.com>
  L:	linux-media@vger.kernel.org
  S:	Maintained
@@ -1038,9 +1038,9 @@ index 281de213ef47..5a1c6e959aa8 100644
  F:	drivers/media/pci/intel/ipu3/
  
 -- 
-2.30.2
+2.31.0
 
-From ecb0bade67c6e9257f946f38bd20f8bfe0a2e311 Mon Sep 17 00:00:00 2001
+From 9a11632421bd2e3727651748959d84482f047766 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 10 Oct 2020 22:47:21 +0100
 Subject: [PATCH] ipu3-cio2: Rename ipu3-cio2.c
@@ -1073,9 +1073,9 @@ similarity index 100%
 rename from drivers/media/pci/intel/ipu3/ipu3-cio2.c
 rename to drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
 -- 
-2.30.2
+2.31.0
 
-From 12ad3c31bbc4c0f09dba50e7c374554e802a341a Mon Sep 17 00:00:00 2001
+From 97bc81ceaa2428ab36e6bef3e3e3bc0544ca7c67 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Wed, 21 Oct 2020 21:53:05 +0100
 Subject: [PATCH] media: v4l2-core: v4l2-async: Check sd->fwnode->secondary in
@@ -1114,9 +1114,9 @@ index e3ab003a6c85..9dd896d085ec 100644
  	 * Otherwise, check if the sd fwnode and the asd fwnode refer to an
  	 * endpoint or a device. If they're of the same type, there's no match.
 -- 
-2.30.2
+2.31.0
 
-From cc6d05503e2d0f13829958a2f424dddc4b39ba42 Mon Sep 17 00:00:00 2001
+From b7fcf41c817206b37b85fd0cbcb09d508992b763 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sun, 15 Nov 2020 08:15:34 +0000
 Subject: [PATCH] ACPI / bus: Add acpi_dev_get_next_match_dev() and helper
@@ -1223,9 +1223,9 @@ index 6d1879bf9440..02a716a0af5d 100644
  {
  	put_device(&adev->dev);
 -- 
-2.30.2
+2.31.0
 
-From efebca9dcf860a7bad17fe0708ee88a08fcc6848 Mon Sep 17 00:00:00 2001
+From ef69f75a3e6a61c03a9ff46ba47e662f5bb62cb2 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 19 Dec 2020 23:55:04 +0000
 Subject: [PATCH] media: v4l2-fwnode: Include v4l2_fwnode_bus_type
@@ -1300,9 +1300,9 @@ index ed0840f3d5df..6ca337c28b3c 100644
   * v4l2_fwnode_endpoint_parse() - parse all fwnode node properties
   * @fwnode: pointer to the endpoint's fwnode handle
 -- 
-2.30.2
+2.31.0
 
-From 6c8f94702de687b4e524f4a9b7096fcb7663e605 Mon Sep 17 00:00:00 2001
+From 29886b566fc0973db0c67a1ffd2948e8044af152 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Wed, 21 Oct 2020 21:53:44 +0100
 Subject: [PATCH] ipu3-cio2: Add cio2-bridge to ipu3-cio2 driver
@@ -1331,10 +1331,10 @@ Patchset: cameras
  create mode 100644 drivers/media/pci/intel/ipu3/cio2-bridge.h
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 5a1c6e959aa8..a6924e3401e8 100644
+index d15fa5b4558a..7ecd004b550f 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -8935,6 +8935,7 @@ INTEL IPU3 CSI-2 CIO2 DRIVER
+@@ -8934,6 +8934,7 @@ INTEL IPU3 CSI-2 CIO2 DRIVER
  M:	Yong Zhi <yong.zhi@intel.com>
  M:	Sakari Ailus <sakari.ailus@linux.intel.com>
  M:	Bingbu Cao <bingbu.cao@intel.com>
@@ -1898,9 +1898,9 @@ index 62187ab5ae43..dc3e343a37fb 100644
 +
  #endif
 -- 
-2.30.2
+2.31.0
 
-From c50f3ad6e0598d2c1f0145ef4f721ca941ec3fbc Mon Sep 17 00:00:00 2001
+From 884f04a9fb744ca3688cef3f211159a0a045fcdd Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Wed, 2 Dec 2020 12:38:10 +0000
 Subject: [PATCH] acpi: utils: move acpi_lpss_dep() to utils
@@ -2000,9 +2000,9 @@ index ddca1550cce6..78b38775f18b 100644
   * acpi_dev_present - Detect that a given ACPI device is present
   * @hid: Hardware ID of the device.
 -- 
-2.30.2
+2.31.0
 
-From b471347e034bf312aef41d393d3df513ff4094c7 Mon Sep 17 00:00:00 2001
+From 669975a2da525294b62b8de3fccc0968e7cac642 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Thu, 26 Nov 2020 21:12:41 +0000
 Subject: [PATCH] acpi: utils: Add function to fetch dependent acpi_devices
@@ -2086,9 +2086,9 @@ index 02a716a0af5d..33deb22294f2 100644
  acpi_dev_get_next_match_dev(struct acpi_device *adev, const char *hid, const char *uid, s64 hrv);
  struct acpi_device *
 -- 
-2.30.2
+2.31.0
 
-From 523dd5733a71416ee206c640aa7acf6e35ac85b3 Mon Sep 17 00:00:00 2001
+From 7704e91667cdd7e686c6eaa847dd87979bf8f3c4 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Mon, 16 Nov 2020 21:38:49 +0000
 Subject: [PATCH] i2c: i2c-core-base: Use format macro in i2c_dev_set_name()
@@ -2154,9 +2154,9 @@ index 56622658b215..65acae61dc5c 100644
  {
  	return NULL;
 -- 
-2.30.2
+2.31.0
 
-From d425d1848f7b12335a5ca4eabdee20e3deb39323 Mon Sep 17 00:00:00 2001
+From fb1a98ff1a91e28db6037356126cda88a15a6322 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Wed, 2 Dec 2020 16:41:42 +0000
 Subject: [PATCH] i2c: i2c-core-acpi: Add i2c_acpi_dev_name()
@@ -2212,9 +2212,9 @@ index 65acae61dc5c..b82aac05b17f 100644
  #else
  static inline bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
 -- 
-2.30.2
+2.31.0
 
-From 14386a0090a1f6cd416985819762fadd1daa4edd Mon Sep 17 00:00:00 2001
+From d9cb74aa6d53c78de606ff5f59c773a22e453e59 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Mon, 16 Nov 2020 00:16:56 +0000
 Subject: [PATCH] gpio: gpiolib-acpi: Export acpi_get_gpiod()
@@ -2276,9 +2276,9 @@ index 9e173c6f312d..90665e538462 100644
  
  static inline int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index)
 -- 
-2.30.2
+2.31.0
 
-From 9ef162787fb77776c0dda7b54a9f6c5d0669124a Mon Sep 17 00:00:00 2001
+From b96bf8bfbe0e01af0a92b5d87aeafa7d09795037 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 12 Dec 2020 23:56:59 +0000
 Subject: [PATCH] mfd: Remove tps68470 MFD driver
@@ -2467,9 +2467,9 @@ index 4a4df4ffd18c..000000000000
 -};
 -builtin_i2c_driver(tps68470_driver);
 -- 
-2.30.2
+2.31.0
 
-From de13b69d32a3f41721e6a6628e4ed32b5d2c8771 Mon Sep 17 00:00:00 2001
+From 08256446a7d92e72d03346d79c4c13d04b5df932 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Fri, 15 Jan 2021 12:37:31 +0000
 Subject: [PATCH] platform: x86: Add intel_skl_int3472 driver
@@ -2511,10 +2511,10 @@ Patchset: cameras
  create mode 100644 drivers/platform/x86/intel_skl_int3472_tps68470.c
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index a6924e3401e8..3ed02216251b 100644
+index 7ecd004b550f..07924325b238 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -9045,6 +9045,11 @@ S:	Maintained
+@@ -9044,6 +9044,11 @@ S:	Maintained
  F:	arch/x86/include/asm/intel_scu_ipc.h
  F:	drivers/platform/x86/intel_scu_*
  
@@ -3436,9 +3436,9 @@ index 000000000000..3fe27ec0caff
 +	return ret;
 +}
 -- 
-2.30.2
+2.31.0
 
-From 228c270c8982ae800a2d33d1bdec63e3a5f196dc Mon Sep 17 00:00:00 2001
+From 0c001553aa56832a3842a57bad282a7b72bf51b1 Mon Sep 17 00:00:00 2001
 From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
 Date: Fri, 11 Dec 2020 21:17:35 +0100
 Subject: [PATCH] PCI: ACPI: Fix up ACPI companion lookup for device 0 on the
@@ -3506,9 +3506,9 @@ index 745a4e0c4994..87e45a800919 100644
  
  /**
 -- 
-2.30.2
+2.31.0
 
-From aab4d239064ef127dc4e4b8abb18e1b2f08b4033 Mon Sep 17 00:00:00 2001
+From 0a73f66367a20de0212faa39b592311106a8c454 Mon Sep 17 00:00:00 2001
 From: Jake Day <jake@ninebysix.com>
 Date: Fri, 25 Sep 2020 10:24:53 -0400
 Subject: [PATCH] media: i2c: Add support for the OV5693 image sensor
@@ -6863,9 +6863,9 @@ index 000000000000..9a508e1f3624
 +static unsigned long N_RES = N_RES_VIDEO;
 +#endif
 -- 
-2.30.2
+2.31.0
 
-From 500a28ad4cd23711dde30970cb93d11456d97d61 Mon Sep 17 00:00:00 2001
+From 84f531d656c111e4535142c8c2b2bea6d643a4ed Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sun, 17 Jan 2021 19:08:18 +0000
 Subject: [PATCH] media: i2c: Add reset pin toggling to ov5693
@@ -6904,9 +6904,9 @@ index 32485e4ed42b..f9ced52ad37a 100644
  
  	if (dev->indicator_led)
 -- 
-2.30.2
+2.31.0
 
-From 81dbc3f420a7abbd3c4156da2d53470bece88b04 Mon Sep 17 00:00:00 2001
+From 7b9c5462af572b2c14680170740f87cbc5e01115 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sun, 17 Jan 2021 21:39:15 +0000
 Subject: [PATCH] media: i2c: Fix misnamed variable in power_down() for ov5693
@@ -6933,9 +6933,9 @@ index f9ced52ad37a..9fd44a3d1d85 100644
  	clk_disable_unprepare(dev->clk);
  
 -- 
-2.30.2
+2.31.0
 
-From 7c64a81a45ab59afdadb44e648770fac8e3d424b Mon Sep 17 00:00:00 2001
+From 47b36f1d7958a10ffa552c4b30f3da60cd1840c6 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20W=C3=BCthrich?= <me@fabwu.ch>
 Date: Fri, 22 Jan 2021 20:58:13 +0100
 Subject: [PATCH] cio2-bridge: Parse sensor orientation and rotation
@@ -7096,9 +7096,9 @@ index dd0ffcafa489..924d99d20328 100644
  	struct property_entry ep_properties[5];
  	struct property_entry dev_properties[3];
 -- 
-2.30.2
+2.31.0
 
-From addf84806ccda9a65461897693720e59d4688411 Mon Sep 17 00:00:00 2001
+From 42463b22f8d86842e38329058faf64c42cae4062 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20W=C3=BCthrich?= <me@fabwu.ch>
 Date: Fri, 22 Jan 2021 21:23:47 +0100
 Subject: [PATCH] ov5693: Add orientation and rotation controls
@@ -7152,9 +7152,9 @@ index 9fd44a3d1d85..1a85800df7ed 100644
  	ov5693->ctrl_handler.lock = &ov5693->input_lock;
  	ov5693->sd.ctrl_handler = &ov5693->ctrl_handler;
 -- 
-2.30.2
+2.31.0
 
-From 417846dee05609eae7ff13f973b00be12a2e56ee Mon Sep 17 00:00:00 2001
+From 41890dd3ae3194c3d5f27b3012eb9bf011096174 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 23 Jan 2021 00:28:32 +0000
 Subject: [PATCH] platform: x86: Stylistic updates for intel-skl-int3472
@@ -7569,9 +7569,9 @@ index 3fe27ec0caff..40629291b339 100644
  		return -EINVAL;
  
 -- 
-2.30.2
+2.31.0
 
-From 09ff63a67c1e4ec9ab8ea7a9221567c9b0825af2 Mon Sep 17 00:00:00 2001
+From a466857c15ce2598dceef764dc02cc894f112ce7 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 23 Jan 2021 00:30:15 +0000
 Subject: [PATCH] platform: x86: Add recalc_rate opp to int3472-discrete clock
@@ -7696,9 +7696,9 @@ index 42ae8396eb64..98eb1ec3399e 100644
  
  	acpi_dev_put(int3472->sensor);
 -- 
-2.30.2
+2.31.0
 
-From 96dcc7d49c520d20324313ad5d9e341ac993e89d Mon Sep 17 00:00:00 2001
+From 24bce0b62e30528f5505ea35ac8dea7a0a4440af Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20W=C3=BCthrich?= <me@fabwu.ch>
 Date: Sun, 24 Jan 2021 11:07:42 +0100
 Subject: [PATCH] cio2-bridge: Use macros and add warnings
@@ -7800,9 +7800,9 @@ index 924d99d20328..e1e388cc9f45 100644
  	(const struct cio2_sensor_config) {	\
  		.hid = _HID,			\
 -- 
-2.30.2
+2.31.0
 
-From d5bfa26e074e1a62b2d7df62d0da84e587a17488 Mon Sep 17 00:00:00 2001
+From f40649765b18153393c408a72a9de8bb51b5ef2d Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Mon, 8 Feb 2021 21:44:38 +0000
 Subject: [PATCH] media: i2c: Tidy up ov5693_init_controls()
@@ -7922,9 +7922,9 @@ index 9a508e1f3624..26819cf3f4d2 100644
  
  enum ov5693_tok_type {
 -- 
-2.30.2
+2.31.0
 
-From c5e293ec94d94439a7a48174394ad10c3a2a8912 Mon Sep 17 00:00:00 2001
+From 451296069dddae10ed01e09eb9ad7f68e7f84cc4 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Mon, 8 Feb 2021 21:46:49 +0000
 Subject: [PATCH] media: i2c: Remove OV5693_PPL_DEFAULT
@@ -7960,9 +7960,9 @@ index a9747ab783d7..7fb368eec327 100644
  						 V4L2_CID_HBLANK, hblank, hblank,
  						 1, hblank);
 -- 
-2.30.2
+2.31.0
 
-From 7996bcf1c43f97c4fb3840cb4f2ee14a3388e91f Mon Sep 17 00:00:00 2001
+From 701d37e3e14563c7fe6876f239c230697c89d5b1 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Mon, 8 Feb 2021 22:53:02 +0000
 Subject: [PATCH] media: i2c: Add vblank control to ov5693 driver
@@ -8036,9 +8036,9 @@ index 26819cf3f4d2..9d7eed97963b 100644
  
  };
 -- 
-2.30.2
+2.31.0
 
-From d9cfb907e3245db3a31c17dd297a0d3951405623 Mon Sep 17 00:00:00 2001
+From 5edbe25d88c928f9a8af0f5c72a1f518ce225b1c Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Wed, 10 Feb 2021 00:36:32 +0000
 Subject: [PATCH] media: i2c: update exposure control for ov5693
@@ -8111,9 +8111,9 @@ index 1950d7ac2d54..cea767230aa9 100644
  	/* Gain */
  
 -- 
-2.30.2
+2.31.0
 
-From 809bf51cec59cb9bca522a11305bac3876ab7f6f Mon Sep 17 00:00:00 2001
+From bbe385433516fa806ee4e9c5da845e8ad5d984fb Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Wed, 10 Feb 2021 00:39:42 +0000
 Subject: [PATCH] media: i2c: Fix incorrect bit-setting
@@ -8147,9 +8147,9 @@ index cea767230aa9..f681dbfcec56 100644
  
  #define OV5693_GAIN_CTRL_H_REG			0x3504
 -- 
-2.30.2
+2.31.0
 
-From a9668ccd857d2ee7f7965218fb0c38a4e81aff31 Mon Sep 17 00:00:00 2001
+From d4f5d01c40c2cff55066a4ffb24535614f5eef1b Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Wed, 10 Feb 2021 16:25:48 +0000
 Subject: [PATCH] media: i2c: Don't set stream on during mode config
@@ -8297,9 +8297,9 @@ index 9d7eed97963b..965208078c2b 100644
  };
  
 -- 
-2.30.2
+2.31.0
 
-From 6017cc96a8559230d39362ecfbe8b33ca275cf2e Mon Sep 17 00:00:00 2001
+From 9031afa6cc5b18771ea392fd6b71160292d95738 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Wed, 10 Feb 2021 16:35:24 +0000
 Subject: [PATCH] media: i2c: Update gain control for ov5693
@@ -8369,9 +8369,9 @@ index f681dbfcec56..51eb3b05d121 100644
  	/* Flip */
  
 -- 
-2.30.2
+2.31.0
 
-From e48602c4e8385160a6d6bc5bc836051a8d8d1e00 Mon Sep 17 00:00:00 2001
+From 0985413a964f9c84768b22ebc2a46c70f6e46f8c Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Wed, 10 Feb 2021 23:44:39 +0000
 Subject: [PATCH] media: i2c: Fixup gain read
@@ -8432,9 +8432,9 @@ index 51eb3b05d121..952558c4f33b 100644
  }
  
 -- 
-2.30.2
+2.31.0
 
-From 9803c1c5da488e0ab83327a104517bf05849570c Mon Sep 17 00:00:00 2001
+From 505e169a9b63f611845e73e00392d3ba0ff84997 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Thu, 11 Feb 2021 00:40:10 +0000
 Subject: [PATCH] media: i2c: Update controls on stream
@@ -8467,9 +8467,9 @@ index 952558c4f33b..dd31083eeb7b 100644
  			       enable ? OV5693_START_STREAMING :
  			       OV5693_STOP_STREAMING);
 -- 
-2.30.2
+2.31.0
 
-From 100c3603cca06763f02ec52f88dbec79622eff1b Mon Sep 17 00:00:00 2001
+From d8602c5b0a6807f0ba092fc89e57dcd1bb98f3a6 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Thu, 11 Feb 2021 23:29:15 +0000
 Subject: [PATCH] media: i2c: Correct link frequency value
@@ -8506,9 +8506,9 @@ index 965208078c2b..7f1d31a82d3d 100644
  
  #define OV5693_NUM_SUPPLIES             2
 -- 
-2.30.2
+2.31.0
 
-From c0369d50392db87d03730e18cf085da267000727 Mon Sep 17 00:00:00 2001
+From 63c36c6a04b11649af432feab98c44b2a26178cd Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Mon, 25 Jan 2021 23:12:09 +0000
 Subject: [PATCH] media: i2c: Cleanup ov5693 driver
@@ -9427,9 +9427,9 @@ index 7f1d31a82d3d..70ccb3aae4c7 100644
          struct regulator_bulk_data supplies[OV5693_NUM_SUPPLIES];
  	struct clk *clk;
 -- 
-2.30.2
+2.31.0
 
-From 5d76f8887f7bbacea877d31b9d208e17afa4defb Mon Sep 17 00:00:00 2001
+From c2b48c99d6c0616d9ffc90ce76e6beae21e7b4f5 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Thu, 28 Jan 2021 12:04:38 +0000
 Subject: [PATCH] media: i2c: Add pm_runtime support to ov5693 driver
@@ -9772,9 +9772,9 @@ index 70ccb3aae4c7..b78d3b474a43 100644
  	struct camera_sensor_platform_data *platform_data;
  	ktime_t timestamp_t_focus_abs;
 -- 
-2.30.2
+2.31.0
 
-From 0d2a6047b0b7814e82ae4fb65711d0016a3907dd Mon Sep 17 00:00:00 2001
+From 9d3f801c400200208e0b6168425ad5c8f1a30628 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Thu, 28 Jan 2021 12:07:36 +0000
 Subject: [PATCH] media: i2c: Remove old power methods from ov5693
@@ -9943,9 +9943,9 @@ index f2eaa5f71a31..ce26ce86fbd5 100644
  	.pad = &ov5693_pad_ops,
  };
 -- 
-2.30.2
+2.31.0
 
-From 9601d86a089fe76d96693dcef43ecd8ffb25f576 Mon Sep 17 00:00:00 2001
+From c6f0b6a745f9f941b926001a6ce2c8d20602733c Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Thu, 28 Jan 2021 12:14:00 +0000
 Subject: [PATCH] media: i2c: Trim unused headers from ov5693
@@ -9984,9 +9984,9 @@ index ce26ce86fbd5..b3b391a49fdb 100644
  #include <media/v4l2-fwnode.h>
  
 -- 
-2.30.2
+2.31.0
 
-From c774480c8be4a894eb6a99fe8dc4c35c7c3312aa Mon Sep 17 00:00:00 2001
+From 8125fa58bb8aba30da77f0c3cfd49df4abc7e950 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 13 Feb 2021 21:39:35 +0000
 Subject: [PATCH] media: i2c: Remove VCM stuff
@@ -10403,9 +10403,9 @@ index b3b391a49fdb..2c82b6578de9 100644
  
  	v4l2_i2c_subdev_init(&ov5693->sd, client, &ov5693_ops);
 -- 
-2.30.2
+2.31.0
 
-From 0368809ed5a860f8c13fa88a08b2daf8ca9b30b8 Mon Sep 17 00:00:00 2001
+From ff99a665c353251e363c633e06ef3de569fdf154 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 13 Feb 2021 22:16:08 +0000
 Subject: [PATCH] media: i2c: Tidy up ov5693 sensor init
@@ -10559,9 +10559,9 @@ index 2c82b6578de9..313bc9177328 100644
  	mutex_unlock(&ov5693->lock);
  	return ret;
 -- 
-2.30.2
+2.31.0
 
-From 4aeadbe8d2ad7ad2d381a93d6bff67e43bb419d3 Mon Sep 17 00:00:00 2001
+From 00575938e8181fe54ea7f36d6da953a1e15af00f Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Fri, 12 Feb 2021 16:14:04 +0000
 Subject: [PATCH] media: i2c: cleanup macros in ov5693.h
@@ -10705,9 +10705,9 @@ index b78d3b474a43..6502777eb5f3 100644
  #define OV5693_FRAME_OFF_NUM		0x4202
  #define OV5693_OTP_BYTE_MAX		32	//change to 32 as needed by otpdata
 -- 
-2.30.2
+2.31.0
 
-From cfefbf554864bff4e1f0ad8f6efb84a38a9326c0 Mon Sep 17 00:00:00 2001
+From 7bfb9ab5c9316e13814796dd21e41fb9778acb8f Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Fri, 12 Feb 2021 16:19:09 +0000
 Subject: [PATCH] media: i2c: use devm_kzalloc() to initialise ov5693
@@ -10735,9 +10735,9 @@ index 313bc9177328..d092ed698eb3 100644
  		return -ENOMEM;
  
 -- 
-2.30.2
+2.31.0
 
-From 0f9c0e37024a80b32a59cdda846453a6516523ae Mon Sep 17 00:00:00 2001
+From 5643c11849368d1b8460e80b5d1565ce86b40f0a Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Fri, 12 Feb 2021 16:26:21 +0000
 Subject: [PATCH] media: i2c: Check for supported clk rate in probe
@@ -10792,9 +10792,9 @@ index 6502777eb5f3..0dfbbe9a0ff2 100644
  #define OV5693_LINK_FREQ_400MHZ		400000000
  /* pixel_rate = link_freq * 2 * nr_of_lanes / bits_per_sample
 -- 
-2.30.2
+2.31.0
 
-From 8ef053f0d14a6131add98b7f79d9e6a90fb706de Mon Sep 17 00:00:00 2001
+From 764f092ecc755bf561ee90fd677cb4e8707e9914 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 13 Feb 2021 23:17:50 +0000
 Subject: [PATCH] media: i2c: Use devres to fetch gpios
@@ -10866,9 +10866,9 @@ index 8082d37841da..c580159079d2 100644
  
  static int ov5693_get_regulators(struct ov5693_device *ov5693)
 -- 
-2.30.2
+2.31.0
 
-From 717f88e7c6a0995ff7bcf1e1fb733e4b098ee0d1 Mon Sep 17 00:00:00 2001
+From c312985739d8f7c5a8dbc6713919d609494bf556 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sat, 13 Feb 2021 23:20:47 +0000
 Subject: [PATCH] media: i2c: Use devres to fetch regulators
@@ -10909,9 +10909,9 @@ index c580159079d2..9f61b470f8ba 100644
  				       ov5693->supplies);
  }
 -- 
-2.30.2
+2.31.0
 
-From 6d59a171b926987c73a819bfd5d76d5534cc2979 Mon Sep 17 00:00:00 2001
+From 5c881a1b9c4331c6d69ded89158416221c5c2298 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sun, 14 Feb 2021 12:39:14 +0000
 Subject: [PATCH] media: i2c: remove debug print
@@ -10988,9 +10988,9 @@ index 9f61b470f8ba..622a7ddf4063 100644
  	return 0;
  }
 -- 
-2.30.2
+2.31.0
 
-From 7c04be0f02d555c497c953cf28a025e0a8c26422 Mon Sep 17 00:00:00 2001
+From e13d10ddf536aabcbf3c67e45bc46edbb87bc4d1 Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sun, 14 Feb 2021 14:32:50 +0000
 Subject: [PATCH] media: i2c: Remove unused resolutions from ov5693
@@ -11417,9 +11417,9 @@ index 0dfbbe9a0ff2..29e6735112da 100644
  static unsigned long N_RES = N_RES_VIDEO;
 -#endif
 -- 
-2.30.2
+2.31.0
 
-From feadb1e6d84240c55830a95ec88e4fd92f9152ee Mon Sep 17 00:00:00 2001
+From cc7c7ef6714d0a7768db66b7023230079988137d Mon Sep 17 00:00:00 2001
 From: Daniel Scally <djrscally@gmail.com>
 Date: Sun, 14 Feb 2021 14:45:58 +0000
 Subject: [PATCH] media: i2c: update set_fmt() for ov5693
@@ -11658,5 +11658,5 @@ index 29e6735112da..0377853f8b2b 100644
  	int otp_size;
  	u8 *otp_data;
 -- 
-2.30.2
+2.31.0
 

+ 3 - 2
patches/5.10/0011-ath10k-firmware-override.patch

@@ -1,4 +1,4 @@
-From a1a0191b40153afcd31e27b168ce08bc61cc705e Mon Sep 17 00:00:00 2001
+From 54e3318366a9455cb63869bf87030652d383cea4 Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Sat, 27 Feb 2021 00:45:52 +0100
 Subject: [PATCH] ath10k: Add module parameters to override board files
@@ -14,6 +14,7 @@ file names in the driver. This allows us to package/deploy the override
 via a modprobe.d config.
 
 Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
+Patchset: ath10k-firmware-override
 ---
  drivers/net/wireless/ath/ath10k/core.c | 58 ++++++++++++++++++++++++++
  1 file changed, 58 insertions(+)
@@ -116,5 +117,5 @@ index d73ad60b571c..f242fd4b81a6 100644
  	ret = firmware_request_nowarn(&fw, filename, ar->dev);
  	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
 -- 
-2.30.2
+2.31.0