Skip to contentSkip to conversation

wifi: libertas: fix WARNING in usb_tx_block

PATCH New Szymon Wilczek 1 participant 1 message Dec 21, 2025 Marvell libertas wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: libertas: fix WARNING in usb_tx_block

The function usb_tx_block() submits cardp->tx_urb without ensuring that any previous transmission on this URB has completed. If a second call occurs while the URB is still active (e.g. during rapid firmware loading), usb_submit_urb() detects the active state and triggers a warning:
'URB submitted while active'.

Fix this by enforcing serialization: call usb_kill_urb() before submitting the new request. This ensures the URB is idle and safe to reuse.

---
 drivers/net/wireless/marvell/libertas/if_usb.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/marvell/libertas/if_usb.c +2 -0
index b3c4040257a6..924ab93b7b67 100644
@@ -426,6 +426,8 @@ static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb
 		goto tx_ret;
 	}
 
+	usb_kill_urb(cardp->tx_urb);
+
 	usb_fill_bulk_urb(cardp->tx_urb, cardp->udev,
 			  usb_sndbulkpipe(cardp->udev,
 					  cardp->ep_out),
Signature · 1 line
2.52.0