Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp566595rdb; Tue, 5 Dec 2023 13:07:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTSuWDX0GTEH6dZhkeTwzAyQD2f90OxBK2HDaMQV6dXxKjFNqeKyT/LRpHtpSQceUXI4fz X-Received: by 2002:a17:906:24d0:b0:a1c:6dfd:1480 with SMTP id f16-20020a17090624d000b00a1c6dfd1480mr1058945ejb.136.1701810435696; Tue, 05 Dec 2023 13:07:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701810435; cv=none; d=google.com; s=arc-20160816; b=aURf2chAD2Lb23M53EVYamLD890NeDcK5/fLU0OYP+v0+zBLIejhP5Vd1oZbnbmZr1 wR26Mbvb3KlpNEkeHXZTsnZVBhreGIo3bCTsZjlCCdaBCzOKK3w1OTrxRgYyBfTSoiB3 u7Wao3YQiDimAb5UFiv9oBQ21WloMpu/UhEkinF4vOoI1nuOkGNoHa1JNS5BTd4HriL+ Z+ZnKDlRXBD8m9OGGaX+lEHSe4JA/vkXubakOYDKm+JRxkAl57Ffz7S5FSLLSV58aIyK v6zMi/EB5DCnNE/8HfTncx861nFhPvw4Tp5UkrDMNKFLPZ7uuqtS9KC/5RRz2g930XSo NQRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=x74SPMcY0OIkNHNYKVP8zxIa11SKy/rAVbNbtzbNtj4=; fh=cdPuMIUMzcfeWwBpBsN+90Ch1f6/v7AQQ7QsuLp5etE=; b=jy7cNyaXyFTdhqYi745CoR6jKRULemzHzNe+N6RM+d7I0ICvMBTSZWkLSpshbB7J+I 5cu0/f0900pQHUDOoqGbBZ1iyuf1BQ7q9UavB/U5Wgqr+osuSJKfQ/wTwwaXu5dBCyh6 VTDEk9goCOSuiKk1dUovYSnG/rZfEbOR/et5Thy4+A3O8RT5JpnDa6vICDu7Z55Se4GU hPBBwFygOiwx3TWPCd3dBHzRHwwxabNSWaptG73hckFdZpqHbDkKsBSPfRqz8FE/RU68 sjb6ZK17mgOYB1stR8tp/cz/zJvzFgqiN26fvYrq5FOSkHXHG4iPVfXnRDluP3WEqXlW Xx9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="COPgiI9/"; spf=pass (google.com: domain of linux-wireless+bounces-442-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-442-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b8-20020a170906708800b00a1a53ec0550si4034031ejk.99.2023.12.05.13.07.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 13:07:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-442-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="COPgiI9/"; spf=pass (google.com: domain of linux-wireless+bounces-442-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-442-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 678B21F213B2 for ; Tue, 5 Dec 2023 21:07:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE6BF6E2A3; Tue, 5 Dec 2023 21:07:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="COPgiI9/" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47C58188; Tue, 5 Dec 2023 13:07:08 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-54bfa9b3ffaso7890084a12.1; Tue, 05 Dec 2023 13:07:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701810427; x=1702415227; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=x74SPMcY0OIkNHNYKVP8zxIa11SKy/rAVbNbtzbNtj4=; b=COPgiI9/aWIyacDSbgSGPgRq4wsvpYGF+lZQtluFjSitxG05E5J4uKRQUkAVFIgHCC LS6rDJLgW81G31iT6qH/RDddjxboFGCmZDdrVTddRT6gvc5B7b8PcBSVIa7AhMmFaT43 Wm0NUiIV8+gsM3MRBLxC0cLEvhRNk9uX84yBo81jOwoZwECoFOrw4wsjeRVeLEwp6BQv KVdQ7czXrdoFHcdi1rVCKhpVC5RHgKBYrf2pDHJJZGutkPBp8ieuQK98GWZ3vwzhCu1t USKbPJR/rtA1L/eiKUxfjBnwlKzlM5xP6NhWX+WVb2QcHCCKxX/psuMNHdj+SaEQMO+c pIBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701810427; x=1702415227; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=x74SPMcY0OIkNHNYKVP8zxIa11SKy/rAVbNbtzbNtj4=; b=IR4RTxxansXVbJKFyWOOZdYDRbvYBjNOgm34Fbl1r0n2sCnZcP+3YXREo+ym+H99DF iBhUg/4vdvvHaZqfaUFQxRm7QhA8mL7l1xdXY1QNYcEJ5ThACb/+eKw2Df9MXZky0ohm aunPMEZZuBeYpaRrlqcGr72qKddktTMxNH+uCj4wqn9gRGaWSneQP40ccUDPahGthqgg 5H45n2uStNf0g9AAfcg5ZoMmhB9sa+K/gjAie5fkVtoAKqyN/0C9v5sfxFURTmq0BXF7 5CHNj9tdY8lGaajRuKIQCORs+H5hJXN0P1ugUQ0Ov3+QpIngYIGPwWHTbFc9EchhEIAP UYZQ== X-Gm-Message-State: AOJu0YzYYmNj7OApiAYpZeHg4aOGKCsfPz5LlleqeqzHJOPS3hWRaH9w VoQt5190cv2FR7pdV2EOmA== X-Received: by 2002:a50:d75a:0:b0:54c:4837:9a85 with SMTP id i26-20020a50d75a000000b0054c48379a85mr4078032edj.44.1701810426428; Tue, 05 Dec 2023 13:07:06 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:d9b0:71c0:990:192e]) by smtp.gmail.com with ESMTPSA id o24-20020aa7c518000000b005485282a520sm1549596edq.75.2023.12.05.13.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 13:07:06 -0800 (PST) From: Alex Bee To: Amitkumar Karwar , Ganapathi Bhat , Kalle Valo Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Alex Bee Subject: [RESEND PATCH] wifi: mwifiex: Restore USB8897 chipset support Date: Tue, 5 Dec 2023 22:07:02 +0100 Message-ID: <20231205210702.209444-1-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch restores USB8897 support which was removed with Commit 60a188a2715f ("mwifiex: remove USB8897 chipset support") There are quite some devices which use this chipset with USB interface. The firmware still exits in linux upstream firmware repo and this simple patch is all what is required to support it in upstream linux (again). Signed-off-by: Alex Bee --- Recently I upstreamed support for Geniatec XPI-3128 SBC which actually has one any of those boards soldered to the onboard USB Host controller. Geniatech has some boards [0], [1], [2] (maybe more) which have this variant soldered the same way. (optional) I've also read that "Xbox Wireless adapter for Windows" uses this chipset (unverified). I've also CC'ed Ganapathi Bhat who last updated the firmware for SDIO and PCIe variant of this chipset: It would be great if the firmware for USB variant could get an update too, as the one which we currently have is quite old - version 15.68.4.p103, while other have some 16.* firmware. [0] https://www.geniatech.com/product/xpi-3288/ [1] https://www.geniatech.com/product/xpi-imx8mm/ [2] https://www.geniatech.com/product/xpi-s905x/ drivers/net/wireless/marvell/mwifiex/Kconfig | 4 ++-- drivers/net/wireless/marvell/mwifiex/usb.c | 14 ++++++++++++++ drivers/net/wireless/marvell/mwifiex/usb.h | 3 +++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/Kconfig b/drivers/net/wireless/marvell/mwifiex/Kconfig index b182f7155d66..277b75eaf91e 100644 --- a/drivers/net/wireless/marvell/mwifiex/Kconfig +++ b/drivers/net/wireless/marvell/mwifiex/Kconfig @@ -35,12 +35,12 @@ config MWIFIEX_PCIE mwifiex_pcie. config MWIFIEX_USB - tristate "Marvell WiFi-Ex Driver for USB8766/8797/8997" + tristate "Marvell WiFi-Ex Driver for USB8766/8797/8897/8997" depends on MWIFIEX && USB select FW_LOADER help This adds support for wireless adapters based on Marvell - 8797/8997 chipset with USB interface. + 8797/8897/8997 chipset with USB interface. If you choose to build it as a module, it will be called mwifiex_usb. diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c index d3ab9572e711..061be9c2ed2f 100644 --- a/drivers/net/wireless/marvell/mwifiex/usb.c +++ b/drivers/net/wireless/marvell/mwifiex/usb.c @@ -28,6 +28,11 @@ static const struct usb_device_id mwifiex_usb_table[] = { {USB_DEVICE_AND_INTERFACE_INFO(USB8XXX_VID, USB8801_PID_2, USB_CLASS_VENDOR_SPEC, USB_SUBCLASS_VENDOR_SPEC, 0xff)}, + /* 8897 */ + {USB_DEVICE(USB8XXX_VID, USB8897_PID_1)}, + {USB_DEVICE_AND_INTERFACE_INFO(USB8XXX_VID, USB8897_PID_2, + USB_CLASS_VENDOR_SPEC, + USB_SUBCLASS_VENDOR_SPEC, 0xff)}, /* 8997 */ {USB_DEVICE(USB8XXX_VID, USB8997_PID_1)}, {USB_DEVICE_AND_INTERFACE_INFO(USB8XXX_VID, USB8997_PID_2, @@ -409,12 +414,14 @@ static int mwifiex_usb_probe(struct usb_interface *intf, case USB8766_PID_1: case USB8797_PID_1: case USB8801_PID_1: + case USB8897_PID_1: case USB8997_PID_1: card->usb_boot_state = USB8XXX_FW_DNLD; break; case USB8766_PID_2: case USB8797_PID_2: case USB8801_PID_2: + case USB8897_PID_2: case USB8997_PID_2: card->usb_boot_state = USB8XXX_FW_READY; break; @@ -1318,6 +1325,12 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) strcpy(adapter->fw_name, USB8997_DEFAULT_FW_NAME); adapter->ext_scan = true; break; + case USB8897_PID_1: + case USB8897_PID_2: + adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K; + strcpy(adapter->fw_name, USB8897_DEFAULT_FW_NAME); + adapter->ext_scan = true; + break; case USB8766_PID_1: case USB8766_PID_2: adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K; @@ -1615,4 +1628,5 @@ MODULE_LICENSE("GPL v2"); MODULE_FIRMWARE(USB8766_DEFAULT_FW_NAME); MODULE_FIRMWARE(USB8797_DEFAULT_FW_NAME); MODULE_FIRMWARE(USB8801_DEFAULT_FW_NAME); +MODULE_FIRMWARE(USB8897_DEFAULT_FW_NAME); MODULE_FIRMWARE(USB8997_DEFAULT_FW_NAME); diff --git a/drivers/net/wireless/marvell/mwifiex/usb.h b/drivers/net/wireless/marvell/mwifiex/usb.h index 7e920b51994c..b7dba256e9f8 100644 --- a/drivers/net/wireless/marvell/mwifiex/usb.h +++ b/drivers/net/wireless/marvell/mwifiex/usb.h @@ -19,6 +19,8 @@ #define USB8797_PID_2 0x2044 #define USB8801_PID_1 0x2049 #define USB8801_PID_2 0x204a +#define USB8897_PID_1 0x2045 +#define USB8897_PID_2 0x2046 #define USB8997_PID_1 0x2052 #define USB8997_PID_2 0x204e @@ -35,6 +37,7 @@ #define USB8766_DEFAULT_FW_NAME "mrvl/usb8766_uapsta.bin" #define USB8797_DEFAULT_FW_NAME "mrvl/usb8797_uapsta.bin" #define USB8801_DEFAULT_FW_NAME "mrvl/usb8801_uapsta.bin" +#define USB8897_DEFAULT_FW_NAME "mrvl/usb8897_uapsta.bin" #define USB8997_DEFAULT_FW_NAME "mrvl/usbusb8997_combo_v4.bin" #define FW_DNLD_TX_BUF_SIZE 620 -- 2.43.0