From: Greg Kroah-Hartman Date: Thu, 22 Feb 2024 08:35:06 +0000 (+0100) Subject: drop mwifiex patches from 5.10 and 5.15 X-Git-Tag: v4.19.307~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4889fb402e3dd4af7bdcd0c22268a5304c3e532b;p=thirdparty%2Fkernel%2Fstable-queue.git drop mwifiex patches from 5.10 and 5.15 --- diff --git a/queue-5.10/mwifiex-select-firmware-based-on-strapping.patch b/queue-5.10/mwifiex-select-firmware-based-on-strapping.patch deleted file mode 100644 index 1b543e65019..00000000000 --- a/queue-5.10/mwifiex-select-firmware-based-on-strapping.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 07c2ebab869c87011d2a3f99451742a774216948 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 22 Apr 2022 11:03:12 +0200 -Subject: mwifiex: Select firmware based on strapping -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Andrejs Cainikovs - -[ Upstream commit 255ca28a659d3cfb069f73c7644853ed93aecdb0 ] - -Some WiFi/Bluetooth modules might have different host connection -options, allowing to either use SDIO for both WiFi and Bluetooth, -or SDIO for WiFi and UART for Bluetooth. It is possible to detect -whether a module has SDIO-SDIO or SDIO-UART connection by reading -its host strap register. - -This change introduces a way to automatically select appropriate -firmware depending of the connection method, and removes a need -of symlinking or overwriting the original firmware file with a -required one. - -Host strap register used in this commit comes from the NXP driver [1] -hosted at Code Aurora. - -[1] https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_sdio_mmc.c?h=rel_imx_5.4.70_2.3.2&id=688b67b2c7220b01521ffe560da7eee33042c7bd#n1274 - -Signed-off-by: Andrejs Cainikovs -Reviewed-by: Alvin Å ipraga -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20220422090313.125857-2-andrejs.cainikovs@toradex.com -Stable-dep-of: 1c5d463c0770 ("wifi: mwifiex: add extra delay for firmware ready") -Signed-off-by: Sasha Levin ---- - drivers/net/wireless/marvell/mwifiex/sdio.c | 21 ++++++++++++++++++++- - drivers/net/wireless/marvell/mwifiex/sdio.h | 5 +++++ - 2 files changed, 25 insertions(+), 1 deletion(-) - -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c -index b09e60fedeb1..016065a56e6c 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.c -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c -@@ -182,6 +182,9 @@ static const struct mwifiex_sdio_card_reg mwifiex_reg_sd8997 = { - .host_int_rsr_reg = 0x4, - .host_int_status_reg = 0x0C, - .host_int_mask_reg = 0x08, -+ .host_strap_reg = 0xF4, -+ .host_strap_mask = 0x01, -+ .host_strap_value = 0x00, - .status_reg_0 = 0xE8, - .status_reg_1 = 0xE9, - .sdio_int_mask = 0xff, -@@ -283,6 +286,9 @@ static const struct mwifiex_sdio_card_reg mwifiex_reg_sd8987 = { - .host_int_rsr_reg = 0x4, - .host_int_status_reg = 0x0C, - .host_int_mask_reg = 0x08, -+ .host_strap_reg = 0xF4, -+ .host_strap_mask = 0x01, -+ .host_strap_value = 0x00, - .status_reg_0 = 0xE8, - .status_reg_1 = 0xE9, - .sdio_int_mask = 0xff, -@@ -537,6 +543,7 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) - struct mwifiex_sdio_device *data = (void *)id->driver_data; - - card->firmware = data->firmware; -+ card->firmware_sdiouart = data->firmware_sdiouart; - card->reg = data->reg; - card->max_ports = data->max_ports; - card->mp_agg_pkt_limit = data->mp_agg_pkt_limit; -@@ -2440,6 +2447,7 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) - int ret; - struct sdio_mmc_card *card = adapter->card; - struct sdio_func *func = card->func; -+ const char *firmware = card->firmware; - - /* save adapter pointer in card */ - card->adapter = adapter; -@@ -2456,7 +2464,18 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) - return ret; - } - -- strcpy(adapter->fw_name, card->firmware); -+ /* Select correct firmware (sdsd or sdiouart) firmware based on the strapping -+ * option -+ */ -+ if (card->firmware_sdiouart) { -+ u8 val; -+ -+ mwifiex_read_reg(adapter, card->reg->host_strap_reg, &val); -+ if ((val & card->reg->host_strap_mask) == card->reg->host_strap_value) -+ firmware = card->firmware_sdiouart; -+ } -+ strcpy(adapter->fw_name, firmware); -+ - if (card->fw_dump_enh) { - adapter->mem_type_mapping_tbl = generic_mem_type_map; - adapter->num_mem_types = 1; -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h -index dec534a6ddb1..5ff33ee53bb3 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.h -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.h -@@ -198,6 +198,9 @@ struct mwifiex_sdio_card_reg { - u8 host_int_rsr_reg; - u8 host_int_status_reg; - u8 host_int_mask_reg; -+ u8 host_strap_reg; -+ u8 host_strap_mask; -+ u8 host_strap_value; - u8 status_reg_0; - u8 status_reg_1; - u8 sdio_int_mask; -@@ -243,6 +246,7 @@ struct sdio_mmc_card { - - struct completion fw_done; - const char *firmware; -+ const char *firmware_sdiouart; - const struct mwifiex_sdio_card_reg *reg; - u8 max_ports; - u8 mp_agg_pkt_limit; -@@ -276,6 +280,7 @@ struct sdio_mmc_card { - - struct mwifiex_sdio_device { - const char *firmware; -+ const char *firmware_sdiouart; - const struct mwifiex_sdio_card_reg *reg; - u8 max_ports; - u8 mp_agg_pkt_limit; --- -2.43.0 - diff --git a/queue-5.10/series b/queue-5.10/series index 019ce614e72..abe8bbb793a 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -344,13 +344,9 @@ can-j1939-fix-uaf-in-j1939_sk_match_filter-during-setsockopt-so_j1939_filter.pat pmdomain-core-move-the-unused-cleanup-to-a-_sync-initcall.patch tracing-inform-kmemleak-of-saved_cmdlines-allocation.patch revert-md-raid5-wait-for-md_sb_change_pending-in-rai.patch -mwifiex-select-firmware-based-on-strapping.patch -wifi-mwifiex-support-sd8978-chipset.patch -wifi-mwifiex-add-extra-delay-for-firmware-ready.patch bus-moxtet-add-spi-device-table.patch pci-dwc-endpoint-fix-dw_pcie_ep_raise_msix_irq-align.patch mips-fix-max_mapnr-being-uninitialized-on-early-stag.patch -wifi-mwifiex-fix-uninitialized-firmware_stat.patch crypto-lib-mpi-fix-unexpected-pointer-access-in-mpi_.patch serial-add-rs485_supported-to-uart_port.patch serial-8250_exar-fill-in-rs485_supported.patch diff --git a/queue-5.10/wifi-mwifiex-add-extra-delay-for-firmware-ready.patch b/queue-5.10/wifi-mwifiex-add-extra-delay-for-firmware-ready.patch deleted file mode 100644 index cc90870bbaf..00000000000 --- a/queue-5.10/wifi-mwifiex-add-extra-delay-for-firmware-ready.patch +++ /dev/null @@ -1,163 +0,0 @@ -From f0b614635792cf579271b83afbee3de650c8654e Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sat, 9 Dec 2023 07:40:29 +0800 -Subject: wifi: mwifiex: add extra delay for firmware ready - -From: David Lin - -[ Upstream commit 1c5d463c0770c6fa2037511a24fb17966fd07d97 ] - -For SDIO IW416, due to a bug, FW may return ready before complete full -initialization. Command timeout may occur at driver load after reboot. -Workaround by adding 100ms delay at checking FW status. - -Signed-off-by: David Lin -Cc: stable@vger.kernel.org -Reviewed-by: Francesco Dolcini -Acked-by: Brian Norris -Tested-by: Marcel Ziswiler # Verdin AM62 (IW416) -Signed-off-by: Kalle Valo -Link: https://msgid.link/20231208234029.2197-1-yu-hao.lin@nxp.com -Signed-off-by: Sasha Levin ---- - drivers/net/wireless/marvell/mwifiex/sdio.c | 19 +++++++++++++++++++ - drivers/net/wireless/marvell/mwifiex/sdio.h | 2 ++ - 2 files changed, 21 insertions(+) - -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c -index 919f1bae61dc..dd4bfb7d71ee 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.c -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c -@@ -343,6 +343,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8786 = { - .can_dump_fw = false, - .can_auto_tdls = false, - .can_ext_scan = false, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = { -@@ -358,6 +359,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = { - .can_dump_fw = false, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = { -@@ -373,6 +375,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = { - .can_dump_fw = false, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = { -@@ -388,6 +391,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = { - .can_dump_fw = true, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8977 = { -@@ -404,6 +408,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8977 = { - .fw_dump_enh = true, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8978 = { -@@ -420,6 +425,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8978 = { - .fw_dump_enh = true, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = true, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8997 = { -@@ -436,6 +442,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8997 = { - .fw_dump_enh = true, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8887 = { -@@ -451,6 +458,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8887 = { - .can_dump_fw = false, - .can_auto_tdls = true, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8987 = { -@@ -467,6 +475,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8987 = { - .fw_dump_enh = true, - .can_auto_tdls = true, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8801 = { -@@ -482,6 +491,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8801 = { - .can_dump_fw = false, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static struct memory_type_mapping generic_mem_type_map[] = { -@@ -574,6 +584,7 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) - card->fw_dump_enh = data->fw_dump_enh; - card->can_auto_tdls = data->can_auto_tdls; - card->can_ext_scan = data->can_ext_scan; -+ card->fw_ready_extra_delay = data->fw_ready_extra_delay; - INIT_WORK(&card->work, mwifiex_sdio_work); - } - -@@ -777,6 +788,7 @@ mwifiex_sdio_read_fw_status(struct mwifiex_adapter *adapter, u16 *dat) - static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter, - u32 poll_num) - { -+ struct sdio_mmc_card *card = adapter->card; - int ret = 0; - u16 firmware_stat; - u32 tries; -@@ -794,6 +806,13 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter, - ret = -1; - } - -+ if (card->fw_ready_extra_delay && -+ firmware_stat == FIRMWARE_READY_SDIO) -+ /* firmware might pretend to be ready, when it's not. -+ * Wait a little bit more as a workaround. -+ */ -+ msleep(100); -+ - return ret; - } - -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h -index 4ed3988fa7d1..5fef84da4cbd 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.h -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.h -@@ -271,6 +271,7 @@ struct sdio_mmc_card { - bool fw_dump_enh; - bool can_auto_tdls; - bool can_ext_scan; -+ bool fw_ready_extra_delay; - - struct mwifiex_sdio_mpa_tx mpa_tx; - struct mwifiex_sdio_mpa_rx mpa_rx; -@@ -294,6 +295,7 @@ struct mwifiex_sdio_device { - bool fw_dump_enh; - bool can_auto_tdls; - bool can_ext_scan; -+ bool fw_ready_extra_delay; - }; - - /* --- -2.43.0 - diff --git a/queue-5.10/wifi-mwifiex-fix-uninitialized-firmware_stat.patch b/queue-5.10/wifi-mwifiex-fix-uninitialized-firmware_stat.patch deleted file mode 100644 index 442ecd89b8b..00000000000 --- a/queue-5.10/wifi-mwifiex-fix-uninitialized-firmware_stat.patch +++ /dev/null @@ -1,41 +0,0 @@ -From fa657732baa106161ffe6508e9e762107daa2e1e Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 21 Dec 2023 09:55:11 +0800 -Subject: wifi: mwifiex: fix uninitialized firmware_stat - -From: David Lin - -[ Upstream commit 3df95e265924ac898c1a38a0c01846dd0bd3b354 ] - -Variable firmware_stat is possible to be used without initialization. - -Signed-off-by: David Lin -Fixes: 1c5d463c0770 ("wifi: mwifiex: add extra delay for firmware ready") -Cc: stable@vger.kernel.org -Reported-by: kernel test robot -Reported-by: Dan Carpenter -Closes: https://lore.kernel.org/r/202312192236.ZflaWYCw-lkp@intel.com/ -Acked-by: Brian Norris -Signed-off-by: Kalle Valo -Link: https://msgid.link/20231221015511.1032128-1-yu-hao.lin@nxp.com -Signed-off-by: Sasha Levin ---- - drivers/net/wireless/marvell/mwifiex/sdio.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c -index dd4bfb7d71ee..45f46a445a6c 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.c -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c -@@ -790,7 +790,7 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter, - { - struct sdio_mmc_card *card = adapter->card; - int ret = 0; -- u16 firmware_stat; -+ u16 firmware_stat = 0; - u32 tries; - - for (tries = 0; tries < poll_num; tries++) { --- -2.43.0 - diff --git a/queue-5.10/wifi-mwifiex-support-sd8978-chipset.patch b/queue-5.10/wifi-mwifiex-support-sd8978-chipset.patch deleted file mode 100644 index 869632e7c5f..00000000000 --- a/queue-5.10/wifi-mwifiex-support-sd8978-chipset.patch +++ /dev/null @@ -1,177 +0,0 @@ -From 5b666d1b9c78f49d5bdc55236a86ddff91ac109b Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 27 Jan 2023 15:02:00 +0100 -Subject: wifi: mwifiex: Support SD8978 chipset - -From: Lukas Wunner - -[ Upstream commit bba047f15851c8b053221f1b276eb7682d59f755 ] - -The Marvell SD8978 (aka NXP IW416) uses identical registers as SD8987, -so reuse the existing mwifiex_reg_sd8987 definition. - -Note that mwifiex_reg_sd8977 and mwifiex_reg_sd8997 are likewise -identical, save for the fw_dump_ctrl register: They define it as 0xf0 -whereas mwifiex_reg_sd8987 defines it as 0xf9. I've verified that -0xf9 is the correct value on SD8978. NXP's out-of-tree driver uses -0xf9 for all of them, so there's a chance that 0xf0 is not correct -in the mwifiex_reg_sd8977 and mwifiex_reg_sd8997 definitions. I cannot -test that for lack of hardware, hence am leaving it as is. - -NXP has only released a firmware which runs Bluetooth over UART. -Perhaps Bluetooth over SDIO is unsupported by this chipset. -Consequently, only an "sdiouart" firmware image is referenced, not an -alternative "sdsd" image. - -Signed-off-by: Lukas Wunner -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/536b4f17a72ca460ad1b07045757043fb0778988.1674827105.git.lukas@wunner.de -Stable-dep-of: 1c5d463c0770 ("wifi: mwifiex: add extra delay for firmware ready") -Signed-off-by: Sasha Levin ---- - .../bindings/net/wireless/marvell-8xxx.txt | 4 ++- - drivers/net/wireless/marvell/mwifiex/Kconfig | 5 ++-- - drivers/net/wireless/marvell/mwifiex/sdio.c | 25 +++++++++++++++++-- - drivers/net/wireless/marvell/mwifiex/sdio.h | 1 + - include/linux/mmc/sdio_ids.h | 1 + - 5 files changed, 31 insertions(+), 5 deletions(-) - -diff --git a/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt b/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt -index 9bf9bbac16e2..cdc303caf5f4 100644 ---- a/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt -+++ b/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt -@@ -1,4 +1,4 @@ --Marvell 8787/8897/8997 (sd8787/sd8897/sd8997/pcie8997) SDIO/PCIE devices -+Marvell 8787/8897/8978/8997 (sd8787/sd8897/sd8978/sd8997/pcie8997) SDIO/PCIE devices - ------ - - This node provides properties for controlling the Marvell SDIO/PCIE wireless device. -@@ -10,7 +10,9 @@ Required properties: - - compatible : should be one of the following: - * "marvell,sd8787" - * "marvell,sd8897" -+ * "marvell,sd8978" - * "marvell,sd8997" -+ * "nxp,iw416" - * "pci11ab,2b42" - * "pci1b4b,2b42" - -diff --git a/drivers/net/wireless/marvell/mwifiex/Kconfig b/drivers/net/wireless/marvell/mwifiex/Kconfig -index 2b4ff2b78a7e..b182f7155d66 100644 ---- a/drivers/net/wireless/marvell/mwifiex/Kconfig -+++ b/drivers/net/wireless/marvell/mwifiex/Kconfig -@@ -10,13 +10,14 @@ config MWIFIEX - mwifiex. - - config MWIFIEX_SDIO -- tristate "Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8887/SD8897/SD8977/SD8987/SD8997" -+ tristate "Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8887/SD8897/SD8977/SD8978/SD8987/SD8997" - depends on MWIFIEX && MMC - select FW_LOADER - select WANT_DEV_COREDUMP - help - This adds support for wireless adapters based on Marvell -- 8786/8787/8797/8887/8897/8977/8987/8997 chipsets with SDIO interface. -+ 8786/8787/8797/8887/8897/8977/8978/8987/8997 chipsets with -+ SDIO interface. SD8978 is also known as NXP IW416. - - If you choose to build it as a module, it will be called - mwifiex_sdio. -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c -index 016065a56e6c..919f1bae61dc 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.c -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c -@@ -275,7 +275,7 @@ static const struct mwifiex_sdio_card_reg mwifiex_reg_sd8887 = { - 0x68, 0x69, 0x6a}, - }; - --static const struct mwifiex_sdio_card_reg mwifiex_reg_sd8987 = { -+static const struct mwifiex_sdio_card_reg mwifiex_reg_sd89xx = { - .start_rd_port = 0, - .start_wr_port = 0, - .base_0_reg = 0xF8, -@@ -406,6 +406,22 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8977 = { - .can_ext_scan = true, - }; - -+static const struct mwifiex_sdio_device mwifiex_sdio_sd8978 = { -+ .firmware_sdiouart = SD8978_SDIOUART_FW_NAME, -+ .reg = &mwifiex_reg_sd89xx, -+ .max_ports = 32, -+ .mp_agg_pkt_limit = 16, -+ .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K, -+ .mp_tx_agg_buf_size = MWIFIEX_MP_AGGR_BUF_SIZE_MAX, -+ .mp_rx_agg_buf_size = MWIFIEX_MP_AGGR_BUF_SIZE_MAX, -+ .supports_sdio_new_mode = true, -+ .has_control_mask = false, -+ .can_dump_fw = true, -+ .fw_dump_enh = true, -+ .can_auto_tdls = false, -+ .can_ext_scan = true, -+}; -+ - static const struct mwifiex_sdio_device mwifiex_sdio_sd8997 = { - .firmware = SD8997_DEFAULT_FW_NAME, - .reg = &mwifiex_reg_sd8997, -@@ -439,7 +455,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8887 = { - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8987 = { - .firmware = SD8987_DEFAULT_FW_NAME, -- .reg = &mwifiex_reg_sd8987, -+ .reg = &mwifiex_reg_sd89xx, - .max_ports = 32, - .mp_agg_pkt_limit = 16, - .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K, -@@ -493,7 +509,9 @@ static struct memory_type_mapping mem_type_mapping_tbl[] = { - static const struct of_device_id mwifiex_sdio_of_match_table[] __maybe_unused = { - { .compatible = "marvell,sd8787" }, - { .compatible = "marvell,sd8897" }, -+ { .compatible = "marvell,sd8978" }, - { .compatible = "marvell,sd8997" }, -+ { .compatible = "nxp,iw416" }, - { } - }; - -@@ -931,6 +949,8 @@ static const struct sdio_device_id mwifiex_ids[] = { - .driver_data = (unsigned long)&mwifiex_sdio_sd8801}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8977_WLAN), - .driver_data = (unsigned long)&mwifiex_sdio_sd8977}, -+ {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8978_WLAN), -+ .driver_data = (unsigned long)&mwifiex_sdio_sd8978}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8987_WLAN), - .driver_data = (unsigned long)&mwifiex_sdio_sd8987}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8997_WLAN), -@@ -3175,5 +3195,6 @@ MODULE_FIRMWARE(SD8797_DEFAULT_FW_NAME); - MODULE_FIRMWARE(SD8897_DEFAULT_FW_NAME); - MODULE_FIRMWARE(SD8887_DEFAULT_FW_NAME); - MODULE_FIRMWARE(SD8977_DEFAULT_FW_NAME); -+MODULE_FIRMWARE(SD8978_SDIOUART_FW_NAME); - MODULE_FIRMWARE(SD8987_DEFAULT_FW_NAME); - MODULE_FIRMWARE(SD8997_DEFAULT_FW_NAME); -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h -index 5ff33ee53bb3..4ed3988fa7d1 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.h -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.h -@@ -37,6 +37,7 @@ - #define SD8887_DEFAULT_FW_NAME "mrvl/sd8887_uapsta.bin" - #define SD8801_DEFAULT_FW_NAME "mrvl/sd8801_uapsta.bin" - #define SD8977_DEFAULT_FW_NAME "mrvl/sdsd8977_combo_v2.bin" -+#define SD8978_SDIOUART_FW_NAME "mrvl/sdiouartiw416_combo_v0.bin" - #define SD8987_DEFAULT_FW_NAME "mrvl/sd8987_uapsta.bin" - #define SD8997_DEFAULT_FW_NAME "mrvl/sdsd8997_combo_v4.bin" - -diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h -index 12036619346c..c26fd094e097 100644 ---- a/include/linux/mmc/sdio_ids.h -+++ b/include/linux/mmc/sdio_ids.h -@@ -100,6 +100,7 @@ - #define SDIO_DEVICE_ID_MARVELL_8977_BT 0x9146 - #define SDIO_DEVICE_ID_MARVELL_8987_WLAN 0x9149 - #define SDIO_DEVICE_ID_MARVELL_8987_BT 0x914a -+#define SDIO_DEVICE_ID_MARVELL_8978_WLAN 0x9159 - - #define SDIO_VENDOR_ID_MEDIATEK 0x037a - #define SDIO_DEVICE_ID_MEDIATEK_MT7663 0x7663 --- -2.43.0 - diff --git a/queue-5.15/mwifiex-select-firmware-based-on-strapping.patch b/queue-5.15/mwifiex-select-firmware-based-on-strapping.patch deleted file mode 100644 index a7fdc1e2083..00000000000 --- a/queue-5.15/mwifiex-select-firmware-based-on-strapping.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 7e80290871316bb942dbb58af4881108959ec77f Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 22 Apr 2022 11:03:12 +0200 -Subject: mwifiex: Select firmware based on strapping -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Andrejs Cainikovs - -[ Upstream commit 255ca28a659d3cfb069f73c7644853ed93aecdb0 ] - -Some WiFi/Bluetooth modules might have different host connection -options, allowing to either use SDIO for both WiFi and Bluetooth, -or SDIO for WiFi and UART for Bluetooth. It is possible to detect -whether a module has SDIO-SDIO or SDIO-UART connection by reading -its host strap register. - -This change introduces a way to automatically select appropriate -firmware depending of the connection method, and removes a need -of symlinking or overwriting the original firmware file with a -required one. - -Host strap register used in this commit comes from the NXP driver [1] -hosted at Code Aurora. - -[1] https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_sdio_mmc.c?h=rel_imx_5.4.70_2.3.2&id=688b67b2c7220b01521ffe560da7eee33042c7bd#n1274 - -Signed-off-by: Andrejs Cainikovs -Reviewed-by: Alvin Å ipraga -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20220422090313.125857-2-andrejs.cainikovs@toradex.com -Stable-dep-of: 1c5d463c0770 ("wifi: mwifiex: add extra delay for firmware ready") -Signed-off-by: Sasha Levin ---- - drivers/net/wireless/marvell/mwifiex/sdio.c | 21 ++++++++++++++++++++- - drivers/net/wireless/marvell/mwifiex/sdio.h | 5 +++++ - 2 files changed, 25 insertions(+), 1 deletion(-) - -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c -index b09e60fedeb1..016065a56e6c 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.c -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c -@@ -182,6 +182,9 @@ static const struct mwifiex_sdio_card_reg mwifiex_reg_sd8997 = { - .host_int_rsr_reg = 0x4, - .host_int_status_reg = 0x0C, - .host_int_mask_reg = 0x08, -+ .host_strap_reg = 0xF4, -+ .host_strap_mask = 0x01, -+ .host_strap_value = 0x00, - .status_reg_0 = 0xE8, - .status_reg_1 = 0xE9, - .sdio_int_mask = 0xff, -@@ -283,6 +286,9 @@ static const struct mwifiex_sdio_card_reg mwifiex_reg_sd8987 = { - .host_int_rsr_reg = 0x4, - .host_int_status_reg = 0x0C, - .host_int_mask_reg = 0x08, -+ .host_strap_reg = 0xF4, -+ .host_strap_mask = 0x01, -+ .host_strap_value = 0x00, - .status_reg_0 = 0xE8, - .status_reg_1 = 0xE9, - .sdio_int_mask = 0xff, -@@ -537,6 +543,7 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) - struct mwifiex_sdio_device *data = (void *)id->driver_data; - - card->firmware = data->firmware; -+ card->firmware_sdiouart = data->firmware_sdiouart; - card->reg = data->reg; - card->max_ports = data->max_ports; - card->mp_agg_pkt_limit = data->mp_agg_pkt_limit; -@@ -2440,6 +2447,7 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) - int ret; - struct sdio_mmc_card *card = adapter->card; - struct sdio_func *func = card->func; -+ const char *firmware = card->firmware; - - /* save adapter pointer in card */ - card->adapter = adapter; -@@ -2456,7 +2464,18 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) - return ret; - } - -- strcpy(adapter->fw_name, card->firmware); -+ /* Select correct firmware (sdsd or sdiouart) firmware based on the strapping -+ * option -+ */ -+ if (card->firmware_sdiouart) { -+ u8 val; -+ -+ mwifiex_read_reg(adapter, card->reg->host_strap_reg, &val); -+ if ((val & card->reg->host_strap_mask) == card->reg->host_strap_value) -+ firmware = card->firmware_sdiouart; -+ } -+ strcpy(adapter->fw_name, firmware); -+ - if (card->fw_dump_enh) { - adapter->mem_type_mapping_tbl = generic_mem_type_map; - adapter->num_mem_types = 1; -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h -index 5648512c9300..ad2c28cbb630 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.h -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.h -@@ -196,6 +196,9 @@ struct mwifiex_sdio_card_reg { - u8 host_int_rsr_reg; - u8 host_int_status_reg; - u8 host_int_mask_reg; -+ u8 host_strap_reg; -+ u8 host_strap_mask; -+ u8 host_strap_value; - u8 status_reg_0; - u8 status_reg_1; - u8 sdio_int_mask; -@@ -241,6 +244,7 @@ struct sdio_mmc_card { - - struct completion fw_done; - const char *firmware; -+ const char *firmware_sdiouart; - const struct mwifiex_sdio_card_reg *reg; - u8 max_ports; - u8 mp_agg_pkt_limit; -@@ -274,6 +278,7 @@ struct sdio_mmc_card { - - struct mwifiex_sdio_device { - const char *firmware; -+ const char *firmware_sdiouart; - const struct mwifiex_sdio_card_reg *reg; - u8 max_ports; - u8 mp_agg_pkt_limit; --- -2.43.0 - diff --git a/queue-5.15/series b/queue-5.15/series index eb44e738fc6..337e5db21ab 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -421,11 +421,7 @@ pmdomain-core-move-the-unused-cleanup-to-a-_sync-initcall.patch tracing-inform-kmemleak-of-saved_cmdlines-allocation.patch af_unix-fix-task-hung-while-purging-oob_skb-in-gc.patch dma-buf-add-dma_fence_timestamp-helper.patch -mwifiex-select-firmware-based-on-strapping.patch -wifi-mwifiex-support-sd8978-chipset.patch -wifi-mwifiex-add-extra-delay-for-firmware-ready.patch bus-moxtet-add-spi-device-table.patch -wifi-mwifiex-fix-uninitialized-firmware_stat.patch crypto-lib-mpi-fix-unexpected-pointer-access-in-mpi_.patch usb-dwc3-gadget-wait-for-ep0-xfers-to-complete-durin.patch usb-dwc3-ep0-don-t-prepare-beyond-setup-stage.patch diff --git a/queue-5.15/wifi-mwifiex-add-extra-delay-for-firmware-ready.patch b/queue-5.15/wifi-mwifiex-add-extra-delay-for-firmware-ready.patch deleted file mode 100644 index 42361774357..00000000000 --- a/queue-5.15/wifi-mwifiex-add-extra-delay-for-firmware-ready.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 307f5bd1d45e51f1e0899ef19771b7ecb1b59f9c Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sat, 9 Dec 2023 07:40:29 +0800 -Subject: wifi: mwifiex: add extra delay for firmware ready - -From: David Lin - -[ Upstream commit 1c5d463c0770c6fa2037511a24fb17966fd07d97 ] - -For SDIO IW416, due to a bug, FW may return ready before complete full -initialization. Command timeout may occur at driver load after reboot. -Workaround by adding 100ms delay at checking FW status. - -Signed-off-by: David Lin -Cc: stable@vger.kernel.org -Reviewed-by: Francesco Dolcini -Acked-by: Brian Norris -Tested-by: Marcel Ziswiler # Verdin AM62 (IW416) -Signed-off-by: Kalle Valo -Link: https://msgid.link/20231208234029.2197-1-yu-hao.lin@nxp.com -Signed-off-by: Sasha Levin ---- - drivers/net/wireless/marvell/mwifiex/sdio.c | 19 +++++++++++++++++++ - drivers/net/wireless/marvell/mwifiex/sdio.h | 2 ++ - 2 files changed, 21 insertions(+) - -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c -index 919f1bae61dc..dd4bfb7d71ee 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.c -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c -@@ -343,6 +343,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8786 = { - .can_dump_fw = false, - .can_auto_tdls = false, - .can_ext_scan = false, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = { -@@ -358,6 +359,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = { - .can_dump_fw = false, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = { -@@ -373,6 +375,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = { - .can_dump_fw = false, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = { -@@ -388,6 +391,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = { - .can_dump_fw = true, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8977 = { -@@ -404,6 +408,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8977 = { - .fw_dump_enh = true, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8978 = { -@@ -420,6 +425,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8978 = { - .fw_dump_enh = true, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = true, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8997 = { -@@ -436,6 +442,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8997 = { - .fw_dump_enh = true, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8887 = { -@@ -451,6 +458,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8887 = { - .can_dump_fw = false, - .can_auto_tdls = true, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8987 = { -@@ -467,6 +475,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8987 = { - .fw_dump_enh = true, - .can_auto_tdls = true, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8801 = { -@@ -482,6 +491,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8801 = { - .can_dump_fw = false, - .can_auto_tdls = false, - .can_ext_scan = true, -+ .fw_ready_extra_delay = false, - }; - - static struct memory_type_mapping generic_mem_type_map[] = { -@@ -574,6 +584,7 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) - card->fw_dump_enh = data->fw_dump_enh; - card->can_auto_tdls = data->can_auto_tdls; - card->can_ext_scan = data->can_ext_scan; -+ card->fw_ready_extra_delay = data->fw_ready_extra_delay; - INIT_WORK(&card->work, mwifiex_sdio_work); - } - -@@ -777,6 +788,7 @@ mwifiex_sdio_read_fw_status(struct mwifiex_adapter *adapter, u16 *dat) - static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter, - u32 poll_num) - { -+ struct sdio_mmc_card *card = adapter->card; - int ret = 0; - u16 firmware_stat; - u32 tries; -@@ -794,6 +806,13 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter, - ret = -1; - } - -+ if (card->fw_ready_extra_delay && -+ firmware_stat == FIRMWARE_READY_SDIO) -+ /* firmware might pretend to be ready, when it's not. -+ * Wait a little bit more as a workaround. -+ */ -+ msleep(100); -+ - return ret; - } - -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h -index e9a9de566cc8..8f11fed8eae9 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.h -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.h -@@ -269,6 +269,7 @@ struct sdio_mmc_card { - bool fw_dump_enh; - bool can_auto_tdls; - bool can_ext_scan; -+ bool fw_ready_extra_delay; - - struct mwifiex_sdio_mpa_tx mpa_tx; - struct mwifiex_sdio_mpa_rx mpa_rx; -@@ -292,6 +293,7 @@ struct mwifiex_sdio_device { - bool fw_dump_enh; - bool can_auto_tdls; - bool can_ext_scan; -+ bool fw_ready_extra_delay; - }; - - /* --- -2.43.0 - diff --git a/queue-5.15/wifi-mwifiex-fix-uninitialized-firmware_stat.patch b/queue-5.15/wifi-mwifiex-fix-uninitialized-firmware_stat.patch deleted file mode 100644 index 36198b9cf83..00000000000 --- a/queue-5.15/wifi-mwifiex-fix-uninitialized-firmware_stat.patch +++ /dev/null @@ -1,41 +0,0 @@ -From e8342bec9354a4d2492c1f8dca1c564065906a33 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 21 Dec 2023 09:55:11 +0800 -Subject: wifi: mwifiex: fix uninitialized firmware_stat - -From: David Lin - -[ Upstream commit 3df95e265924ac898c1a38a0c01846dd0bd3b354 ] - -Variable firmware_stat is possible to be used without initialization. - -Signed-off-by: David Lin -Fixes: 1c5d463c0770 ("wifi: mwifiex: add extra delay for firmware ready") -Cc: stable@vger.kernel.org -Reported-by: kernel test robot -Reported-by: Dan Carpenter -Closes: https://lore.kernel.org/r/202312192236.ZflaWYCw-lkp@intel.com/ -Acked-by: Brian Norris -Signed-off-by: Kalle Valo -Link: https://msgid.link/20231221015511.1032128-1-yu-hao.lin@nxp.com -Signed-off-by: Sasha Levin ---- - drivers/net/wireless/marvell/mwifiex/sdio.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c -index dd4bfb7d71ee..45f46a445a6c 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.c -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c -@@ -790,7 +790,7 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter, - { - struct sdio_mmc_card *card = adapter->card; - int ret = 0; -- u16 firmware_stat; -+ u16 firmware_stat = 0; - u32 tries; - - for (tries = 0; tries < poll_num; tries++) { --- -2.43.0 - diff --git a/queue-5.15/wifi-mwifiex-support-sd8978-chipset.patch b/queue-5.15/wifi-mwifiex-support-sd8978-chipset.patch deleted file mode 100644 index eea9eed97dc..00000000000 --- a/queue-5.15/wifi-mwifiex-support-sd8978-chipset.patch +++ /dev/null @@ -1,177 +0,0 @@ -From 444a1f89cee2117c4524c52fb57d2a70f40d89bc Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 27 Jan 2023 15:02:00 +0100 -Subject: wifi: mwifiex: Support SD8978 chipset - -From: Lukas Wunner - -[ Upstream commit bba047f15851c8b053221f1b276eb7682d59f755 ] - -The Marvell SD8978 (aka NXP IW416) uses identical registers as SD8987, -so reuse the existing mwifiex_reg_sd8987 definition. - -Note that mwifiex_reg_sd8977 and mwifiex_reg_sd8997 are likewise -identical, save for the fw_dump_ctrl register: They define it as 0xf0 -whereas mwifiex_reg_sd8987 defines it as 0xf9. I've verified that -0xf9 is the correct value on SD8978. NXP's out-of-tree driver uses -0xf9 for all of them, so there's a chance that 0xf0 is not correct -in the mwifiex_reg_sd8977 and mwifiex_reg_sd8997 definitions. I cannot -test that for lack of hardware, hence am leaving it as is. - -NXP has only released a firmware which runs Bluetooth over UART. -Perhaps Bluetooth over SDIO is unsupported by this chipset. -Consequently, only an "sdiouart" firmware image is referenced, not an -alternative "sdsd" image. - -Signed-off-by: Lukas Wunner -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/536b4f17a72ca460ad1b07045757043fb0778988.1674827105.git.lukas@wunner.de -Stable-dep-of: 1c5d463c0770 ("wifi: mwifiex: add extra delay for firmware ready") -Signed-off-by: Sasha Levin ---- - .../bindings/net/wireless/marvell-8xxx.txt | 4 ++- - drivers/net/wireless/marvell/mwifiex/Kconfig | 5 ++-- - drivers/net/wireless/marvell/mwifiex/sdio.c | 25 +++++++++++++++++-- - drivers/net/wireless/marvell/mwifiex/sdio.h | 1 + - include/linux/mmc/sdio_ids.h | 1 + - 5 files changed, 31 insertions(+), 5 deletions(-) - -diff --git a/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt b/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt -index 9bf9bbac16e2..cdc303caf5f4 100644 ---- a/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt -+++ b/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt -@@ -1,4 +1,4 @@ --Marvell 8787/8897/8997 (sd8787/sd8897/sd8997/pcie8997) SDIO/PCIE devices -+Marvell 8787/8897/8978/8997 (sd8787/sd8897/sd8978/sd8997/pcie8997) SDIO/PCIE devices - ------ - - This node provides properties for controlling the Marvell SDIO/PCIE wireless device. -@@ -10,7 +10,9 @@ Required properties: - - compatible : should be one of the following: - * "marvell,sd8787" - * "marvell,sd8897" -+ * "marvell,sd8978" - * "marvell,sd8997" -+ * "nxp,iw416" - * "pci11ab,2b42" - * "pci1b4b,2b42" - -diff --git a/drivers/net/wireless/marvell/mwifiex/Kconfig b/drivers/net/wireless/marvell/mwifiex/Kconfig -index 2b4ff2b78a7e..b182f7155d66 100644 ---- a/drivers/net/wireless/marvell/mwifiex/Kconfig -+++ b/drivers/net/wireless/marvell/mwifiex/Kconfig -@@ -10,13 +10,14 @@ config MWIFIEX - mwifiex. - - config MWIFIEX_SDIO -- tristate "Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8887/SD8897/SD8977/SD8987/SD8997" -+ tristate "Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8887/SD8897/SD8977/SD8978/SD8987/SD8997" - depends on MWIFIEX && MMC - select FW_LOADER - select WANT_DEV_COREDUMP - help - This adds support for wireless adapters based on Marvell -- 8786/8787/8797/8887/8897/8977/8987/8997 chipsets with SDIO interface. -+ 8786/8787/8797/8887/8897/8977/8978/8987/8997 chipsets with -+ SDIO interface. SD8978 is also known as NXP IW416. - - If you choose to build it as a module, it will be called - mwifiex_sdio. -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c -index 016065a56e6c..919f1bae61dc 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.c -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c -@@ -275,7 +275,7 @@ static const struct mwifiex_sdio_card_reg mwifiex_reg_sd8887 = { - 0x68, 0x69, 0x6a}, - }; - --static const struct mwifiex_sdio_card_reg mwifiex_reg_sd8987 = { -+static const struct mwifiex_sdio_card_reg mwifiex_reg_sd89xx = { - .start_rd_port = 0, - .start_wr_port = 0, - .base_0_reg = 0xF8, -@@ -406,6 +406,22 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8977 = { - .can_ext_scan = true, - }; - -+static const struct mwifiex_sdio_device mwifiex_sdio_sd8978 = { -+ .firmware_sdiouart = SD8978_SDIOUART_FW_NAME, -+ .reg = &mwifiex_reg_sd89xx, -+ .max_ports = 32, -+ .mp_agg_pkt_limit = 16, -+ .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K, -+ .mp_tx_agg_buf_size = MWIFIEX_MP_AGGR_BUF_SIZE_MAX, -+ .mp_rx_agg_buf_size = MWIFIEX_MP_AGGR_BUF_SIZE_MAX, -+ .supports_sdio_new_mode = true, -+ .has_control_mask = false, -+ .can_dump_fw = true, -+ .fw_dump_enh = true, -+ .can_auto_tdls = false, -+ .can_ext_scan = true, -+}; -+ - static const struct mwifiex_sdio_device mwifiex_sdio_sd8997 = { - .firmware = SD8997_DEFAULT_FW_NAME, - .reg = &mwifiex_reg_sd8997, -@@ -439,7 +455,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8887 = { - - static const struct mwifiex_sdio_device mwifiex_sdio_sd8987 = { - .firmware = SD8987_DEFAULT_FW_NAME, -- .reg = &mwifiex_reg_sd8987, -+ .reg = &mwifiex_reg_sd89xx, - .max_ports = 32, - .mp_agg_pkt_limit = 16, - .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K, -@@ -493,7 +509,9 @@ static struct memory_type_mapping mem_type_mapping_tbl[] = { - static const struct of_device_id mwifiex_sdio_of_match_table[] __maybe_unused = { - { .compatible = "marvell,sd8787" }, - { .compatible = "marvell,sd8897" }, -+ { .compatible = "marvell,sd8978" }, - { .compatible = "marvell,sd8997" }, -+ { .compatible = "nxp,iw416" }, - { } - }; - -@@ -931,6 +949,8 @@ static const struct sdio_device_id mwifiex_ids[] = { - .driver_data = (unsigned long)&mwifiex_sdio_sd8801}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8977_WLAN), - .driver_data = (unsigned long)&mwifiex_sdio_sd8977}, -+ {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8978_WLAN), -+ .driver_data = (unsigned long)&mwifiex_sdio_sd8978}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8987_WLAN), - .driver_data = (unsigned long)&mwifiex_sdio_sd8987}, - {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8997_WLAN), -@@ -3175,5 +3195,6 @@ MODULE_FIRMWARE(SD8797_DEFAULT_FW_NAME); - MODULE_FIRMWARE(SD8897_DEFAULT_FW_NAME); - MODULE_FIRMWARE(SD8887_DEFAULT_FW_NAME); - MODULE_FIRMWARE(SD8977_DEFAULT_FW_NAME); -+MODULE_FIRMWARE(SD8978_SDIOUART_FW_NAME); - MODULE_FIRMWARE(SD8987_DEFAULT_FW_NAME); - MODULE_FIRMWARE(SD8997_DEFAULT_FW_NAME); -diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h -index ad2c28cbb630..e9a9de566cc8 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sdio.h -+++ b/drivers/net/wireless/marvell/mwifiex/sdio.h -@@ -37,6 +37,7 @@ - #define SD8887_DEFAULT_FW_NAME "mrvl/sd8887_uapsta.bin" - #define SD8801_DEFAULT_FW_NAME "mrvl/sd8801_uapsta.bin" - #define SD8977_DEFAULT_FW_NAME "mrvl/sdsd8977_combo_v2.bin" -+#define SD8978_SDIOUART_FW_NAME "mrvl/sdiouartiw416_combo_v0.bin" - #define SD8987_DEFAULT_FW_NAME "mrvl/sd8987_uapsta.bin" - #define SD8997_DEFAULT_FW_NAME "mrvl/sdsd8997_combo_v4.bin" - -diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h -index a85c9f0bd470..d1524c5e49a1 100644 ---- a/include/linux/mmc/sdio_ids.h -+++ b/include/linux/mmc/sdio_ids.h -@@ -101,6 +101,7 @@ - #define SDIO_DEVICE_ID_MARVELL_8977_BT 0x9146 - #define SDIO_DEVICE_ID_MARVELL_8987_WLAN 0x9149 - #define SDIO_DEVICE_ID_MARVELL_8987_BT 0x914a -+#define SDIO_DEVICE_ID_MARVELL_8978_WLAN 0x9159 - - #define SDIO_VENDOR_ID_MEDIATEK 0x037a - #define SDIO_DEVICE_ID_MEDIATEK_MT7663 0x7663 --- -2.43.0 -