if_ath_tx.c (227651) | if_ath_tx.c (227868) |
---|---|
1/*- 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_tx.c 227651 2011-11-18 05:06:30Z adrian $"); | 31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_tx.c 227868 2011-11-23 05:00:25Z adrian $"); |
32 33/* 34 * Driver for the Atheros Wireless LAN controller. 35 * 36 * This software is derived from work of Atsushi Onoe; his contribution 37 * is greatly appreciated. 38 */ 39 --- 2895 unchanged lines hidden (view full) --- 2935 struct ath_buf *bf_next, *bf; 2936 ath_bufhead bf_q; 2937 int drops = 0; 2938 struct ieee80211_tx_ampdu *tap; 2939 ath_bufhead bf_cq; 2940 2941 TAILQ_INIT(&bf_q); 2942 TAILQ_INIT(&bf_cq); | 32 33/* 34 * Driver for the Atheros Wireless LAN controller. 35 * 36 * This software is derived from work of Atsushi Onoe; his contribution 37 * is greatly appreciated. 38 */ 39 --- 2895 unchanged lines hidden (view full) --- 2935 struct ath_buf *bf_next, *bf; 2936 ath_bufhead bf_q; 2937 int drops = 0; 2938 struct ieee80211_tx_ampdu *tap; 2939 ath_bufhead bf_cq; 2940 2941 TAILQ_INIT(&bf_q); 2942 TAILQ_INIT(&bf_cq); |
2943 sc->sc_stats.ast_tx_aggrfail++; | |
2944 2945 /* 2946 * Update rate control - all frames have failed. 2947 * 2948 * XXX use the length in the first frame in the series; 2949 * XXX just so things are consistent for now. 2950 */ 2951 ath_tx_update_ratectrl(sc, ni, bf_first->bf_state.bfs_rc, 2952 &bf_first->bf_status.ds_txstat, 2953 bf_first->bf_state.bfs_pktlen, 2954 bf_first->bf_state.bfs_nframes, bf_first->bf_state.bfs_nframes); 2955 2956 ATH_TXQ_LOCK(sc->sc_ac2q[tid->ac]); 2957 tap = ath_tx_get_tx_tid(an, tid->tid); | 2943 2944 /* 2945 * Update rate control - all frames have failed. 2946 * 2947 * XXX use the length in the first frame in the series; 2948 * XXX just so things are consistent for now. 2949 */ 2950 ath_tx_update_ratectrl(sc, ni, bf_first->bf_state.bfs_rc, 2951 &bf_first->bf_status.ds_txstat, 2952 bf_first->bf_state.bfs_pktlen, 2953 bf_first->bf_state.bfs_nframes, bf_first->bf_state.bfs_nframes); 2954 2955 ATH_TXQ_LOCK(sc->sc_ac2q[tid->ac]); 2956 tap = ath_tx_get_tx_tid(an, tid->tid); |
2957 sc->sc_stats.ast_tx_aggr_failall++; |
|
2958 2959 /* Retry all subframes */ 2960 bf = bf_first; 2961 while (bf) { 2962 bf_next = bf->bf_next; 2963 bf->bf_next = NULL; /* Remove it from the aggr list */ | 2958 2959 /* Retry all subframes */ 2960 bf = bf_first; 2961 while (bf) { 2962 bf_next = bf->bf_next; 2963 bf->bf_next = NULL; /* Remove it from the aggr list */ |
2964 sc->sc_stats.ast_tx_aggr_fail++; |
|
2964 if (ath_tx_retry_subframe(sc, bf, &bf_q)) { 2965 drops++; 2966 bf->bf_next = NULL; 2967 TAILQ_INSERT_TAIL(&bf_cq, bf, bf_list); 2968 } 2969 bf = bf_next; 2970 } 2971 --- 219 unchanged lines hidden (view full) --- 3191 bf->bf_next = NULL; /* Remove it from the aggr list */ 3192 3193 DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, 3194 "%s: checking bf=%p seqno=%d; ack=%d\n", 3195 __func__, bf, SEQNO(bf->bf_state.bfs_seqno), 3196 ATH_BA_ISSET(ba, ba_index)); 3197 3198 if (tx_ok && ATH_BA_ISSET(ba, ba_index)) { | 2965 if (ath_tx_retry_subframe(sc, bf, &bf_q)) { 2966 drops++; 2967 bf->bf_next = NULL; 2968 TAILQ_INSERT_TAIL(&bf_cq, bf, bf_list); 2969 } 2970 bf = bf_next; 2971 } 2972 --- 219 unchanged lines hidden (view full) --- 3192 bf->bf_next = NULL; /* Remove it from the aggr list */ 3193 3194 DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, 3195 "%s: checking bf=%p seqno=%d; ack=%d\n", 3196 __func__, bf, SEQNO(bf->bf_state.bfs_seqno), 3197 ATH_BA_ISSET(ba, ba_index)); 3198 3199 if (tx_ok && ATH_BA_ISSET(ba, ba_index)) { |
3200 sc->sc_stats.ast_tx_aggr_ok++; |
|
3199 ath_tx_update_baw(sc, an, atid, bf); 3200 bf->bf_state.bfs_dobaw = 0; 3201 if (! bf->bf_state.bfs_addedbaw) 3202 device_printf(sc->sc_dev, 3203 "%s: wasn't added: seqno %d\n", 3204 __func__, SEQNO(bf->bf_state.bfs_seqno)); 3205 bf->bf_next = NULL; 3206 TAILQ_INSERT_TAIL(&bf_cq, bf, bf_list); 3207 } else { | 3201 ath_tx_update_baw(sc, an, atid, bf); 3202 bf->bf_state.bfs_dobaw = 0; 3203 if (! bf->bf_state.bfs_addedbaw) 3204 device_printf(sc->sc_dev, 3205 "%s: wasn't added: seqno %d\n", 3206 __func__, SEQNO(bf->bf_state.bfs_seqno)); 3207 bf->bf_next = NULL; 3208 TAILQ_INSERT_TAIL(&bf_cq, bf, bf_list); 3209 } else { |
3210 sc->sc_stats.ast_tx_aggr_fail++; |
|
3208 if (ath_tx_retry_subframe(sc, bf, &bf_q)) { 3209 drops++; 3210 bf->bf_next = NULL; 3211 TAILQ_INSERT_TAIL(&bf_cq, bf, bf_list); 3212 } 3213 nbad++; 3214 } 3215 bf = bf_next; --- 721 unchanged lines hidden --- | 3211 if (ath_tx_retry_subframe(sc, bf, &bf_q)) { 3212 drops++; 3213 bf->bf_next = NULL; 3214 TAILQ_INSERT_TAIL(&bf_cq, bf, bf_list); 3215 } 3216 nbad++; 3217 } 3218 bf = bf_next; --- 721 unchanged lines hidden --- |