Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2729187rdd; Fri, 12 Jan 2024 22:35:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5LVV5AZkYml7ua/fSgxco1WoGdAzBXPUakVYrNSHFSDdYExQMZVH0XUJbIHAOGUyI1E5r X-Received: by 2002:aa7:c716:0:b0:558:89a6:1d4e with SMTP id i22-20020aa7c716000000b0055889a61d4emr1150077edq.9.1705127757253; Fri, 12 Jan 2024 22:35:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705127757; cv=none; d=google.com; s=arc-20160816; b=OlJsKWSF03DCtwCNtURP4/ig8lQapFpESp839zwv/wBP2OzVE2GLBUYHms+/6+oFTJ PB5CaNwtJjeEXxtVWmVCdhhcV7ku+WY7F8gS9zPvyrfhME0haqKEhNwv6K5uLUrgg/mF DUCasNcTahfCR2Mm2JMUIW5G2uAx0baqRiZ64wGeE6OuNepY+zLw2ijMxuRkuyCIf94J UdM5j6608qcyihqo4wUOIz4Yzs0notboRkMumq7M7ctbnaz3euwCnDvGHduD7TFbWt1m 9yZFXEpk0h/VtjD3SkC2ru2Bd+/Wh/AI8Mn68nU6sGApkrudVJW/upcS/grWTjwLvmMP pT0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=W6Jk+eNfMTtH27+ZaXKzzqqE90rXGPz53+UPExvxHw0=; fh=KLYZroe+hx7PXWHWhHVHm3kyvVqb0KvAA/sfTDNY4Ss=; b=fNV9dILlJthIZxiiu7hVjL+JkMB0aWg4QGNcdAXJ7HdBxRgYCS+heIMImuJFkqxp8O /uySe6INCbgvMjNh1P0Kb6In2D+CqvL023CrcJzRTeONygum1p4nSFGsm1xB8od1zJ7h IIag/vXuMVeZ2DzP/nLGIWch4MdzFrlJLpJcP404HV9ZeS/u5G5+sVE7HY/aeQiCfBFs jaintLwGPpYDRf9gV+E2DfPCfR0ZNE2ax/wyrsG9yf6fe3dsz0ib9d9HuqKMMtf/kXyc yCyc2pBN8V9ngcveHZRDTxznQImEe0Q3OT49qKVlq4G3FC28Vo+brXzfsikT8vPHZpVb gqeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e4YE+osR; spf=pass (google.com: domain of linux-wireless+bounces-1869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h6-20020aa7de06000000b005571b172e12si2033019edv.680.2024.01.12.22.35.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 22:35:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e4YE+osR; spf=pass (google.com: domain of linux-wireless+bounces-1869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 8E35D1F22144 for ; Sat, 13 Jan 2024 06:35:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EC8D1C32; Sat, 13 Jan 2024 06:35:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="e4YE+osR" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7501AEDD for ; Sat, 13 Jan 2024 06:35:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9C53C433F1; Sat, 13 Jan 2024 06:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705127750; bh=2lDoVeuLevD2cGbfNrGI37VCjhOWBD5I+sKHOpjsC9c=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=e4YE+osRpjEd1aEsMdRTUvqs0IzbTkaecOwVsqQr86Qm9ANGHL4BeBrYHw3wGtenC jfVDra7tv3UZD37zI41Ovf9oi0Os6/R/P/fqrqETDUWZLiX0AaXdBZhXflI23LpB/S DEEpHjYnVnz9bGtfdJInREBrmIPUkU06VXjXyckHgmNHG4pSnn0FZp5PQ2c4iSHsoH zD8JH4OpaqNUpdqJW0K694TsaEqp+4H5/+VeYFb0lrej8hh3Lsv5bW8PqbDW77/2Au CttnviQ64ozP0+9IHfXzEfXTjeKEeMT+NaT5y2wEwhTpAxyx9nkQJpP1HY/LTBVsJC QSbs1Grksj+Xg== From: Kalle Valo To: Bitterblue Smith Cc: "linux-wireless@vger.kernel.org" , Ping-Ke Shih , Larry Finger Subject: Re: wifi: rtlwifi: Speed up firmware loading for USB References: <6351ca3f-6b06-4fe1-ace7-6e9d67497dce@gmail.com> Date: Sat, 13 Jan 2024 08:35:48 +0200 In-Reply-To: <6351ca3f-6b06-4fe1-ace7-6e9d67497dce@gmail.com> (Bitterblue Smith's message of "Fri, 12 Jan 2024 21:49:53 +0200") Message-ID: <87o7dphha3.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Bitterblue Smith writes: > Currently it takes almost 6 seconds to upload the firmware for RTL8192CU > (and 11 seconds for RTL8192DU). That's because the firmware is uploaded > one byte at a time. > > Also, after plugging the device, the firmware gets uploaded three times > before a connection to the AP is established. > > Maybe this is fine for most users, but when testing changes to the > driver it's really annoying to wait so long. > > Speed up the firmware upload by writing chunks of 64 bytes at a time. > This way it takes about 110 ms for RTL8192CU (and about 210 ms for > RTL8192DU). > > PCI devices could upload it in chunks of 4 bytes, but I don't have any > to test and commit 89d32c9071aa ("rtlwifi: Download firmware as bytes > rather than as dwords") decided otherwise anyway. > > Signed-off-by: Bitterblue Smith There's another version so I assume I can drop this one: https://patchwork.kernel.org/project/linux-wireless/patch/0d262acd-4f94-41c2-8d15-83486aeb976b@gmail.com/ -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches