From patchwork Sat Dec 18 23:54:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Mosberger-Tang X-Patchwork-Id: 526851 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E31EC4332F for ; Sat, 18 Dec 2021 23:55:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234948AbhLRXzR (ORCPT ); Sat, 18 Dec 2021 18:55:17 -0500 Received: from o1.ptr2625.egauge.net ([167.89.112.53]:25578 "EHLO o1.ptr2625.egauge.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234942AbhLRXyX (ORCPT ); Sat, 18 Dec 2021 18:54:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=egauge.net; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type; s=sgd; bh=IYmT6TTHPC/39vBU9dvhhZgPOg2hMoZjIu47+sZZ8/Y=; b=DrIkitBRj6SIJRBZaSVKO9ueK2xD5t8aW7naXhXX6fqRceeFVFdBfO6qms1f6TUJOZ0B 5q4UakY+CURZgJIzZSviRUm2dno4ILOZGAs0RxPaHPUZBNyevCy0Q6za1l1F9Dku7T+N1e qvpKMiL0Ra9OWv3UZevI5XfqyDKPkdAvFmeQvCehCxKzJw8UEo2JsZ+FMcaUOY4j6JUMOw IUG5YQaN4Yo7R++GSkOvO4WdsJYZflrvoNRr25SFiatTY0qO9uyEZq1lSgANYyhHVdqMZ0 kh9zehXwCJBRcIPH7GYujpQR5rmuOtwpQtqoiRwoBsA8vypIoYX3pzJDB/OWRZeA== Received: by filterdrecv-7bf5c69d5-rfl26 with SMTP id filterdrecv-7bf5c69d5-rfl26-1-61BE74A8-21 2021-12-18 23:54:16.88665959 +0000 UTC m=+9336805.628309366 Received: from pearl.egauge.net (unknown) by geopod-ismtpd-3-1 (SG) with ESMTP id ha9uPykwTiKK9-3KpfG97g Sat, 18 Dec 2021 23:54:16.774 +0000 (UTC) Received: by pearl.egauge.net (Postfix, from userid 1000) id A620E701151; Sat, 18 Dec 2021 16:54:15 -0700 (MST) From: David Mosberger-Tang Subject: [PATCH 12/23] wilc1000: refactor wilc_wlan_cfg_commit() a bit Date: Sat, 18 Dec 2021 23:54:17 +0000 (UTC) Message-Id: <20211218235404.3963475-13-davidm@egauge.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211218235404.3963475-1-davidm@egauge.net> References: <20211218235404.3963475-1-davidm@egauge.net> MIME-Version: 1.0 X-SG-EID: +kMxBqj35EdRUKoy8diX1j4AXmPtd302oan+iXZuF8m2Nw4HRW2irNspffT/khET6RJF6+Prbl0h/EtF1rRLvKs3SfP4/LmsE6Ln6mpnK0MOyjtcUUykcOLofxHKn7Tfu4mZexV0qSUeyJEITbq7Dtupz/czzZWZvHFrBH6gMI9ick4loi/RsyZXv4CerHUzSbt4B3KIfdxsqJZys7AM3q9VN7wnpyNmUf4iGjqAnRi5icejU0DOHDCnEWOZv0f/NBEA5drcIG5LsW32SZ4y7g== To: Ajay Singh Cc: Claudiu Beznea , Kalle Valo , "David S. Miller" , Jakub Kicinski , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Mosberger-Tang X-Entity-ID: Xg4JGAcGrJFIz2kDG9eoaQ== Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This cleanup makes the switch to sk_buff queues easier. There is no functional change. Signed-off-by: David Mosberger-Tang --- drivers/net/wireless/microchip/wilc1000/wlan.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c index 8435e1abdd515..8cd2ede8d2775 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan.c +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c @@ -1271,15 +1271,13 @@ static int wilc_wlan_cfg_commit(struct wilc_vif *vif, int type, struct wilc *wilc = vif->wilc; struct wilc_cfg_frame *cfg = &wilc->cfg_frame; int t_len = wilc->cfg_frame_offset + sizeof(struct wilc_cfg_cmd_hdr); + struct wilc_cfg_cmd_hdr *hdr; - if (type == WILC_CFG_SET) - cfg->hdr.cmd_type = 'W'; - else - cfg->hdr.cmd_type = 'Q'; - - cfg->hdr.seq_no = wilc->cfg_seq_no % 256; - cfg->hdr.total_len = cpu_to_le16(t_len); - cfg->hdr.driver_handler = cpu_to_le32(drv_handler); + hdr = &cfg->hdr; + hdr->cmd_type = (type == WILC_CFG_SET) ? 'W' : 'Q'; + hdr->seq_no = wilc->cfg_seq_no % 256; + hdr->total_len = cpu_to_le16(t_len); + hdr->driver_handler = cpu_to_le32(drv_handler); wilc->cfg_seq_no = cfg->hdr.seq_no; if (!wilc_wlan_txq_add_cfg_pkt(vif, (u8 *)&cfg->hdr, t_len))