Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04779fdd authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville
Browse files

brcmfmac: .txdata() bus callback should not call brcmf_txcomplete()



With firmware-signalling the packet handed to the bus specific driver
layer should not be discarded with brcmf_txcomplete() in the failure
path. Instead only an error is returned and the caller decides what
to do with the packet.

Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4061f895
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2297,7 +2297,6 @@ static int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *pkt)
	spin_lock_irqsave(&bus->txqlock, flags);
	if (!brcmf_c_prec_enq(bus->sdiodev->dev, &bus->txq, pkt, prec)) {
		skb_pull(pkt, SDPCM_HDRLEN);
		brcmf_txcomplete(bus->sdiodev->dev, pkt, false);
		brcmf_err("out of bus->txq !!!\n");
		ret = -ENOSR;
	} else {
+5 −1
Original line number Diff line number Diff line
@@ -1745,6 +1745,7 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
	int fifo = BRCMF_FWS_FIFO_BCMC;
	bool multicast = is_multicast_ether_addr(eh->h_dest);
	bool pae = eh->h_proto == htons(ETH_P_PAE);
	int ret;

	/* determine the priority */
	if (!skb->priority)
@@ -1759,7 +1760,10 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
		brcmf_proto_hdrpush(drvr, ifp->ifidx, 0, skb);

		/* Use bus module to send data frame */
		return brcmf_bus_txdata(drvr->bus_if, skb);
		ret = brcmf_bus_txdata(drvr->bus_if, skb);
		if (ret < 0)
			brcmf_txfinalize(drvr, skb, false);
		return ret;
	}

	/* set control buffer information */
+0 −1
Original line number Diff line number Diff line
@@ -614,7 +614,6 @@ static int brcmf_usb_tx(struct device *dev, struct sk_buff *skb)
	return 0;

fail:
	brcmf_txcomplete(dev, skb, false);
	return ret;
}