Deleted Added
full compact
if_ath_tx.c (248985) if_ath_tx.c (248988)
1/*-
2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
3 * Copyright (c) 2010-2012 Adrian Chadd, Xenion Pty Ltd
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 15 unchanged lines hidden (view full) ---

24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
26 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGES.
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
3 * Copyright (c) 2010-2012 Adrian Chadd, Xenion Pty Ltd
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 15 unchanged lines hidden (view full) ---

24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
26 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGES.
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_tx.c 248985 2013-04-01 20:12:21Z adrian $");
32__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_tx.c 248988 2013-04-01 20:57:13Z adrian $");
33
34/*
35 * Driver for the Atheros Wireless LAN controller.
36 *
37 * This software is derived from work of Atsushi Onoe; his contribution
38 * is greatly appreciated.
39 */
40

--- 3796 unchanged lines hidden (view full) ---

3837
3838static struct ath_buf *
3839ath_tx_retry_clone(struct ath_softc *sc, struct ath_node *an,
3840 struct ath_tid *tid, struct ath_buf *bf)
3841{
3842 struct ath_buf *nbf;
3843 int error;
3844
33
34/*
35 * Driver for the Atheros Wireless LAN controller.
36 *
37 * This software is derived from work of Atsushi Onoe; his contribution
38 * is greatly appreciated.
39 */
40

--- 3796 unchanged lines hidden (view full) ---

3837
3838static struct ath_buf *
3839ath_tx_retry_clone(struct ath_softc *sc, struct ath_node *an,
3840 struct ath_tid *tid, struct ath_buf *bf)
3841{
3842 struct ath_buf *nbf;
3843 int error;
3844
3845 /*
3846 * Clone the buffer. This will handle the dma unmap and
3847 * copy the node reference to the new buffer. If this
3848 * works out, 'bf' will have no DMA mapping, no mbuf
3849 * pointer and no node reference.
3850 */
3845 nbf = ath_buf_clone(sc, bf);
3846
3847#if 0
3848 device_printf(sc->sc_dev, "%s: ATH_BUF_BUSY; cloning\n",
3849 __func__);
3850#endif
3851
3852 if (nbf == NULL) {

--- 21 unchanged lines hidden (view full) ---

3874 ATH_TXBUF_UNLOCK(sc);
3875 return NULL;
3876 }
3877
3878 /* Update BAW if required, before we free the original buf */
3879 if (bf->bf_state.bfs_dobaw)
3880 ath_tx_switch_baw_buf(sc, an, tid, bf, nbf);
3881
3851 nbf = ath_buf_clone(sc, bf);
3852
3853#if 0
3854 device_printf(sc->sc_dev, "%s: ATH_BUF_BUSY; cloning\n",
3855 __func__);
3856#endif
3857
3858 if (nbf == NULL) {

--- 21 unchanged lines hidden (view full) ---

3880 ATH_TXBUF_UNLOCK(sc);
3881 return NULL;
3882 }
3883
3884 /* Update BAW if required, before we free the original buf */
3885 if (bf->bf_state.bfs_dobaw)
3886 ath_tx_switch_baw_buf(sc, an, tid, bf, nbf);
3887
3882 /* Free current buffer; return the older buffer */
3883 bf->bf_m = NULL;
3884 bf->bf_node = NULL;
3888 /* Free original buffer; return new buffer */
3885 ath_freebuf(sc, bf);
3886
3887 return nbf;
3888}
3889
3890/*
3891 * Handle retrying an unaggregate frame in an aggregate
3892 * session.

--- 1664 unchanged lines hidden ---
3889 ath_freebuf(sc, bf);
3890
3891 return nbf;
3892}
3893
3894/*
3895 * Handle retrying an unaggregate frame in an aggregate
3896 * session.

--- 1664 unchanged lines hidden ---