Thread (55 messages) 55 messages, 3 authors, 2021-12-28
STALE1618d

[PATCH v2 28/50] wilc1000: improve send_packets() a bit

From: David Mosberger-Tang <hidden>
Date: 2021-12-23 01:16:06
Also in: linux-wireless, lkml
Subsystem: microchip wilc1000 wifi driver, the rest · Maintainers: Ajay Singh, Claudiu Beznea, Linus Torvalds

Improve the documentation and simplify the code a bit.

Signed-off-by: David Mosberger-Tang <redacted>
---
 drivers/net/wireless/microchip/wilc1000/wlan.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 287c0843ba152..033979cc85b43 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -858,29 +858,26 @@ static int copy_packets(struct wilc *wilc, int entries, u32 *vmm_table,
 }
 
 /**
- * send_packets() - Send packets to the chip
+ * send_packets() - send the transmit buffer to the chip
  * @wilc: Pointer to the wilc structure.
- * @len: The length of the buffer containing the packets to be sent to
- *	the chip.
+ * @len: The length of the buffer containing the packets to be to the chip.
  *
- * Send the packets in the VMM table to the chip.
+ * Send the packets in the transmit buffer to the chip.
  *
  * Context: The bus must have been acquired.
  *
- * Return:
- *	Negative number on error, 0 on success.
+ * Return: Negative number on error, 0 on success.
  */
 static int send_packets(struct wilc *wilc, int len)
 {
 	const struct wilc_hif_func *func = wilc->hif_func;
 	int ret;
-	u8 *txb = wilc->tx_buffer;
 
 	ret = func->hif_clear_int_ext(wilc, ENABLE_TX_VMM);
 	if (ret)
 		return ret;
 
-	return func->hif_block_tx_ext(wilc, 0, txb, len);
+	return func->hif_block_tx_ext(wilc, 0, wilc->tx_buffer, len);
 }
 
 int wilc_wlan_handle_txq(struct wilc *wilc, u32 *txq_count)
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help