Deleted Added
full compact
if_ath_tx.c (242144) if_ath_tx.c (242271)
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 242144 2012-10-26 16:31:12Z adrian $");
32__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_tx.c 242271 2012-10-28 21:13:12Z 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

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

2214 error = EIO; /* XXX */
2215 goto bad2;
2216 }
2217 }
2218 sc->sc_wd_timer = 5;
2219 ifp->if_opackets++;
2220 sc->sc_stats.ast_tx_raw++;
2221
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

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

2214 error = EIO; /* XXX */
2215 goto bad2;
2216 }
2217 }
2218 sc->sc_wd_timer = 5;
2219 ifp->if_opackets++;
2220 sc->sc_stats.ast_tx_raw++;
2221
2222 /*
2223 * Update the TIM - if there's anything queued to the
2224 * software queue and power save is enabled, we should
2225 * set the TIM.
2226 */
2227 ath_tx_update_tim(sc, ni, 1);
2228
2222 ATH_PCU_LOCK(sc);
2223 sc->sc_txstart_cnt--;
2224 ATH_PCU_UNLOCK(sc);
2225
2226 return 0;
2227bad2:
2228 ATH_KTR(sc, ATH_KTR_TX, 3, "ath_raw_xmit: bad2: m=%p, params=%p, "
2229 "bf=%p",

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

5287 sc->sc_addba_response_timeout(ni, tap);
5288
5289 /* Unpause the TID; which reschedules it */
5290 ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]);
5291 ath_tx_tid_resume(sc, atid);
5292 ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]);
5293}
5294
2229 ATH_PCU_LOCK(sc);
2230 sc->sc_txstart_cnt--;
2231 ATH_PCU_UNLOCK(sc);
2232
2233 return 0;
2234bad2:
2235 ATH_KTR(sc, ATH_KTR_TX, 3, "ath_raw_xmit: bad2: m=%p, params=%p, "
2236 "bf=%p",

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

5294 sc->sc_addba_response_timeout(ni, tap);
5295
5296 /* Unpause the TID; which reschedules it */
5297 ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]);
5298 ath_tx_tid_resume(sc, atid);
5299 ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]);
5300}
5301
5295#if 0
5296/*
5297 * Check if a node is asleep or not.
5298 */
5302/*
5303 * Check if a node is asleep or not.
5304 */
5299static int
5305int
5300ath_tx_node_is_asleep(struct ath_softc *sc, struct ath_node *an)
5301{
5302
5303 ATH_NODE_LOCK_ASSERT(an);
5304
5305 return (an->an_is_powersave);
5306}
5306ath_tx_node_is_asleep(struct ath_softc *sc, struct ath_node *an)
5307{
5308
5309 ATH_NODE_LOCK_ASSERT(an);
5310
5311 return (an->an_is_powersave);
5312}
5307#endif
5308
5309/*
5310 * Mark a node as currently "in powersaving."
5311 * This suspends all traffic on the node.
5312 *
5313 * This must be called with the node/tx locks free.
5314 *
5315 * XXX TODO: the locking silliness below is due to how the node

--- 154 unchanged lines hidden ---
5313
5314/*
5315 * Mark a node as currently "in powersaving."
5316 * This suspends all traffic on the node.
5317 *
5318 * This must be called with the node/tx locks free.
5319 *
5320 * XXX TODO: the locking silliness below is due to how the node

--- 154 unchanged lines hidden ---