Deleted Added
full compact
if_ath_tx.c (246450) if_ath_tx.c (246745)
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 246450 2013-02-07 02:15:25Z adrian $");
32__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_tx.c 246745 2013-02-13 05:32:19Z 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

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

1119 (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != IEEE80211_FC0_TYPE_CTL) {
1120 u_int16_t dur;
1121 if (shortPreamble)
1122 dur = rt->info[rix].spAckDuration;
1123 else
1124 dur = rt->info[rix].lpAckDuration;
1125 if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) {
1126 dur += dur; /* additional SIFS+ACK */
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

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

1119 (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != IEEE80211_FC0_TYPE_CTL) {
1120 u_int16_t dur;
1121 if (shortPreamble)
1122 dur = rt->info[rix].spAckDuration;
1123 else
1124 dur = rt->info[rix].lpAckDuration;
1125 if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) {
1126 dur += dur; /* additional SIFS+ACK */
1127 if (bf->bf_state.bfs_nextpktlen == 0) {
1128 device_printf(sc->sc_dev,
1129 "%s: next txfrag len=0?\n",
1130 __func__);
1131 }
1127 KASSERT(bf->bf_m->m_nextpkt != NULL, ("no fragment"));
1132 /*
1133 * Include the size of next fragment so NAV is
1134 * updated properly. The last fragment uses only
1135 * the ACK duration
1136 *
1137 * XXX TODO: ensure that the rate lookup for each
1138 * fragment is the same as the rate used by the
1139 * first fragment!
1140 */
1141 dur += ath_hal_computetxtime(ah, rt,
1128 /*
1129 * Include the size of next fragment so NAV is
1130 * updated properly. The last fragment uses only
1131 * the ACK duration
1132 *
1133 * XXX TODO: ensure that the rate lookup for each
1134 * fragment is the same as the rate used by the
1135 * first fragment!
1136 */
1137 dur += ath_hal_computetxtime(ah, rt,
1142 bf->bf_state.bfs_nextpktlen,
1138 bf->bf_m->m_nextpkt->m_pkthdr.len,
1143 rix, shortPreamble);
1144 }
1145 if (isfrag) {
1146 /*
1147 * Force hardware to use computed duration for next
1148 * fragment by disabling multi-rate retry which updates
1149 * duration based on the multi-rate duration table.
1150 */

--- 4390 unchanged lines hidden ---
1139 rix, shortPreamble);
1140 }
1141 if (isfrag) {
1142 /*
1143 * Force hardware to use computed duration for next
1144 * fragment by disabling multi-rate retry which updates
1145 * duration based on the multi-rate duration table.
1146 */

--- 4390 unchanged lines hidden ---