Deleted Added
full compact
if_ath_tx.c (241500) if_ath_tx.c (241566)
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 241500 2012-10-13 06:27:34Z adrian $");
32__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_tx.c 241566 2012-10-14 23:52:30Z 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

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

2942 device_printf(sc->sc_dev, "%s: not filtered?!\n", __func__);
2943
2944 DPRINTF(sc, ATH_DEBUG_SW_TX_FILT, "%s: bf=%p\n", __func__, bf);
2945
2946 /* Set the retry bit and bump the retry counter */
2947 ath_tx_set_retry(sc, bf);
2948 sc->sc_stats.ast_tx_swfiltered++;
2949
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

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

2942 device_printf(sc->sc_dev, "%s: not filtered?!\n", __func__);
2943
2944 DPRINTF(sc, ATH_DEBUG_SW_TX_FILT, "%s: bf=%p\n", __func__, bf);
2945
2946 /* Set the retry bit and bump the retry counter */
2947 ath_tx_set_retry(sc, bf);
2948 sc->sc_stats.ast_tx_swfiltered++;
2949
2950 ATH_TID_INSERT_TAIL(&tid->filtq, bf, bf_list);
2950 ATH_TID_FILT_INSERT_TAIL(tid, bf, bf_list);
2951}
2952
2953/*
2954 * Handle a completed filtered frame from the given TID.
2955 * This just enables/pauses the filtered frame state if required
2956 * and appends the filtered frame to the filtered queue.
2957 */
2958static void

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

2991 return;
2992
2993 DPRINTF(sc, ATH_DEBUG_SW_TX_FILT, "%s: hwq=0, transition back\n",
2994 __func__);
2995 tid->isfiltered = 0;
2996 tid->clrdmask = 1;
2997
2998 /* XXX this is really quite inefficient */
2951}
2952
2953/*
2954 * Handle a completed filtered frame from the given TID.
2955 * This just enables/pauses the filtered frame state if required
2956 * and appends the filtered frame to the filtered queue.
2957 */
2958static void

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

2991 return;
2992
2993 DPRINTF(sc, ATH_DEBUG_SW_TX_FILT, "%s: hwq=0, transition back\n",
2994 __func__);
2995 tid->isfiltered = 0;
2996 tid->clrdmask = 1;
2997
2998 /* XXX this is really quite inefficient */
2999 while ((bf = ATH_TID_LAST(&tid->filtq, ath_bufhead_s)) != NULL) {
3000 ATH_TID_REMOVE(&tid->filtq, bf, bf_list);
2999 while ((bf = ATH_TID_FILT_LAST(tid, ath_bufhead_s)) != NULL) {
3000 ATH_TID_FILT_REMOVE(tid, bf, bf_list);
3001 ATH_TID_INSERT_HEAD(tid, bf, bf_list);
3002 }
3003
3004 ath_tx_tid_resume(sc, tid);
3005}
3006
3007/*
3008 * Called when a single (aggregate or otherwise) frame is completed.

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

3403
3404 ATH_TID_REMOVE(tid, bf, bf_list);
3405 ath_tx_tid_drain_pkt(sc, an, tid, bf_cq, bf);
3406 }
3407
3408 /* And now, drain the filtered frame queue */
3409 t = 0;
3410 for (;;) {
3001 ATH_TID_INSERT_HEAD(tid, bf, bf_list);
3002 }
3003
3004 ath_tx_tid_resume(sc, tid);
3005}
3006
3007/*
3008 * Called when a single (aggregate or otherwise) frame is completed.

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

3403
3404 ATH_TID_REMOVE(tid, bf, bf_list);
3405 ath_tx_tid_drain_pkt(sc, an, tid, bf_cq, bf);
3406 }
3407
3408 /* And now, drain the filtered frame queue */
3409 t = 0;
3410 for (;;) {
3411 bf = ATH_TID_FIRST(&tid->filtq);
3411 bf = ATH_TID_FILT_FIRST(tid);
3412 if (bf == NULL)
3413 break;
3414
3415 if (t == 0) {
3416 ath_tx_tid_drain_print(sc, an, "filt", tid, bf);
3417 t = 1;
3418 }
3419
3412 if (bf == NULL)
3413 break;
3414
3415 if (t == 0) {
3416 ath_tx_tid_drain_print(sc, an, "filt", tid, bf);
3417 t = 1;
3418 }
3419
3420 ATH_TID_REMOVE(&tid->filtq, bf, bf_list);
3420 ATH_TID_FILT_REMOVE(tid, bf, bf_list);
3421 ath_tx_tid_drain_pkt(sc, an, tid, bf_cq, bf);
3422 }
3423
3424 /*
3425 * Override the clrdmask configuration for the next frame
3426 * in case there is some future transmission, just to get
3427 * the ball rolling.
3428 *

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

3662 TAILQ_INIT(&bf_cq);
3663 ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]);
3664
3665 /*
3666 * Move the filtered frames to the TX queue, before
3667 * we run off and discard/process things.
3668 */
3669 /* XXX this is really quite inefficient */
3421 ath_tx_tid_drain_pkt(sc, an, tid, bf_cq, bf);
3422 }
3423
3424 /*
3425 * Override the clrdmask configuration for the next frame
3426 * in case there is some future transmission, just to get
3427 * the ball rolling.
3428 *

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

3662 TAILQ_INIT(&bf_cq);
3663 ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]);
3664
3665 /*
3666 * Move the filtered frames to the TX queue, before
3667 * we run off and discard/process things.
3668 */
3669 /* XXX this is really quite inefficient */
3670 while ((bf = ATH_TID_LAST(&atid->filtq, ath_bufhead_s)) != NULL) {
3671 ATH_TID_REMOVE(&atid->filtq, bf, bf_list);
3670 while ((bf = ATH_TID_FILT_LAST(atid, ath_bufhead_s)) != NULL) {
3671 ATH_TID_FILT_REMOVE(atid, bf, bf_list);
3672 ATH_TID_INSERT_HEAD(atid, bf, bf_list);
3673 }
3674
3675 /*
3676 * Update the frames in the software TX queue:
3677 *
3678 * + Discard retry frames in the queue
3679 * + Fix the completion function to be non-aggregate

--- 1786 unchanged lines hidden ---
3672 ATH_TID_INSERT_HEAD(atid, bf, bf_list);
3673 }
3674
3675 /*
3676 * Update the frames in the software TX queue:
3677 *
3678 * + Discard retry frames in the queue
3679 * + Fix the completion function to be non-aggregate

--- 1786 unchanged lines hidden ---