[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211223011358.4031459-13-davidm@egauge.net>
Date: Thu, 23 Dec 2021 01:14:06 +0000 (UTC)
From: David Mosberger-Tang <davidm@...uge.net>
To: Ajay Singh <ajay.kathat@...rochip.com>
Cc: Claudiu Beznea <claudiu.beznea@...rochip.com>,
Kalle Valo <kvalo@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
David Mosberger-Tang <davidm@...uge.net>
Subject: [PATCH v2 12/50] wilc1000: refactor wilc_wlan_cfg_commit() a bit
This cleanup makes the switch to sk_buff queues easier. There is no
functional change.
Signed-off-by: David Mosberger-Tang <davidm@...uge.net>
---
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 26b7d219ecbbb..2e3dc04120832 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))
--
2.25.1
Powered by blists - more mailing lists