From nobody Tue Feb 10 17:34:49 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 CF2DF18E036 for ; Tue, 20 Aug 2024 11:55:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724154939; cv=none; b=B5jqbhEPEH9BgMDzWieQNPPgOl217ajh8lSwSd4BoEjyIcqX99eceBuFiIyM/s6BV/rCGlam7ArJ8VOBwzmhYxRAW2cc3WKoG0rgI9KaG0MQbv27aMWX9rd620AWWyLx0yP6eq1k+/JoRuFtD+9hvCoKU6BU7ALwAoKVb4UUCnk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724154939; c=relaxed/simple; bh=Dy2rYpe7ga87zMwt7gfk8WBV36PYG+YAWWRPNjyhnG0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qo5E9+ThJDbvM4wnwQJ2UF25NzZ2XCnAfJ+ROkYKzTnJRdtsAVtsdoSpMXntp6mVpnnbNgR4RWzRyfPYzi/QuXCITIGCuFhwE0Bovxs6HfgdBSrjhZC8NzqkvzYPFennOHbS1LeA/16oOM1xeXT2MTBT4qFUgYMhHC8TrbZMA2A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sgNSS-0000An-5X; Tue, 20 Aug 2024 13:55:28 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgNSR-001lLl-FB; Tue, 20 Aug 2024 13:55:27 +0200 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1sgNSR-00GnIQ-1B; Tue, 20 Aug 2024 13:55:27 +0200 From: Sascha Hauer Date: Tue, 20 Aug 2024 13:55:32 +0200 Subject: [PATCH 07/31] wifi: mwifiex: pass adapter to mwifiex_dnld_cmd_to_fw() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240820-mwifiex-cleanup-v1-7-320d8de4a4b7@pengutronix.de> References: <20240820-mwifiex-cleanup-v1-0-320d8de4a4b7@pengutronix.de> In-Reply-To: <20240820-mwifiex-cleanup-v1-0-320d8de4a4b7@pengutronix.de> To: Brian Norris , Francesco Dolcini , Kalle Valo Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Sascha Hauer X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1724154927; l=2048; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=Dy2rYpe7ga87zMwt7gfk8WBV36PYG+YAWWRPNjyhnG0=; b=AHnT83hR8Of4IOFaciGACi2w940X2VOUZRD3Yl2ZwiPr8es4PYjzUpSa5MqsTAB0VVvXRKQ7g XN3h2sITF2kA9CNoRhutQl9BThpQkTgLebOEiB1oeNuTPZfSbTd+4m+ X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org priv is not needed in mwifiex_dnld_cmd_to_fw(), so pass the adapter to it as context pointer. Signed-off-by: Sascha Hauer --- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wi= reless/marvell/mwifiex/cmdevt.c index d50a2925d0739..4f814110f750e 100644 --- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c +++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c @@ -159,11 +159,9 @@ static int mwifiex_cmd_host_cmd(struct mwifiex_private= *priv, * sending. Afterwards, it logs the command ID and action for debugging * and sets up the command timeout timer. */ -static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv, +static int mwifiex_dnld_cmd_to_fw(struct mwifiex_adapter *adapter, struct cmd_ctrl_node *cmd_node) { - - struct mwifiex_adapter *adapter =3D priv->adapter; int ret; struct host_cmd_ds_command *host_cmd; uint16_t cmd_code; @@ -742,7 +740,6 @@ mwifiex_insert_cmd_to_pending_q(struct mwifiex_adapter = *adapter, */ int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapter) { - struct mwifiex_private *priv; struct cmd_ctrl_node *cmd_node; int ret =3D 0; struct host_cmd_ds_command *host_cmd; @@ -766,7 +763,6 @@ int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapt= er) struct cmd_ctrl_node, list); =20 host_cmd =3D (struct host_cmd_ds_command *) (cmd_node->cmd_skb->data); - priv =3D cmd_node->priv; =20 if (adapter->ps_state !=3D PS_STATE_AWAKE) { mwifiex_dbg(adapter, ERROR, @@ -781,7 +777,7 @@ int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapt= er) spin_unlock_bh(&adapter->cmd_pending_q_lock); =20 spin_unlock_bh(&adapter->mwifiex_cmd_lock); - ret =3D mwifiex_dnld_cmd_to_fw(priv, cmd_node); + ret =3D mwifiex_dnld_cmd_to_fw(adapter, cmd_node); =20 /* Any command sent to the firmware when host is in sleep * mode should de-configure host sleep. We should skip the --=20 2.39.2