Deleted Added
full compact
if_ath_tx.c (232764) if_ath_tx.c (232794)
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 232764 2012-03-10 04:14:04Z adrian $");
31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_tx.c 232794 2012-03-10 19:58:23Z 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

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

1404
1405 /*
1406 * Enforce how deep the multicast queue can grow.
1407 *
1408 * XXX duplicated in ath_raw_xmit().
1409 */
1410 if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
1411 ATH_TXQ_LOCK(sc->sc_cabq);
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

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

1404
1405 /*
1406 * Enforce how deep the multicast queue can grow.
1407 *
1408 * XXX duplicated in ath_raw_xmit().
1409 */
1410 if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
1411 ATH_TXQ_LOCK(sc->sc_cabq);
1412 ATH_TXQ_LOCK(&avp->av_mcastq);
1413
1412
1414 if ((sc->sc_cabq->axq_depth + avp->av_mcastq.axq_depth) >
1415 sc->sc_txq_mcastq_maxdepth) {
1413 if (sc->sc_cabq->axq_depth > sc->sc_txq_mcastq_maxdepth) {
1416 sc->sc_stats.ast_tx_mcastq_overflow++;
1417 r = ENOBUFS;
1418 }
1419
1414 sc->sc_stats.ast_tx_mcastq_overflow++;
1415 r = ENOBUFS;
1416 }
1417
1420 ATH_TXQ_UNLOCK(&avp->av_mcastq);
1421 ATH_TXQ_UNLOCK(sc->sc_cabq);
1422
1423 if (r != 0) {
1424 m_freem(m0);
1425 return r;
1426 }
1427 }
1428

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

1754ath_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
1755 const struct ieee80211_bpf_params *params)
1756{
1757 struct ieee80211com *ic = ni->ni_ic;
1758 struct ifnet *ifp = ic->ic_ifp;
1759 struct ath_softc *sc = ifp->if_softc;
1760 struct ath_buf *bf;
1761 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *);
1418 ATH_TXQ_UNLOCK(sc->sc_cabq);
1419
1420 if (r != 0) {
1421 m_freem(m0);
1422 return r;
1423 }
1424 }
1425

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

1751ath_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
1752 const struct ieee80211_bpf_params *params)
1753{
1754 struct ieee80211com *ic = ni->ni_ic;
1755 struct ifnet *ifp = ic->ic_ifp;
1756 struct ath_softc *sc = ifp->if_softc;
1757 struct ath_buf *bf;
1758 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *);
1762 struct ieee80211vap *vap = ni->ni_vap;
1763 struct ath_vap *avp = ATH_VAP(vap);
1764 int error = 0;
1765
1766 ATH_PCU_LOCK(sc);
1767 if (sc->sc_inreset_cnt > 0) {
1768 device_printf(sc->sc_dev, "%s: sc_inreset_cnt > 0; bailing\n",
1769 __func__);
1770 error = EIO;
1771 ATH_PCU_UNLOCK(sc);

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

1785
1786 /*
1787 * Enforce how deep the multicast queue can grow.
1788 *
1789 * XXX duplicated in ath_tx_start().
1790 */
1791 if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
1792 ATH_TXQ_LOCK(sc->sc_cabq);
1759 int error = 0;
1760
1761 ATH_PCU_LOCK(sc);
1762 if (sc->sc_inreset_cnt > 0) {
1763 device_printf(sc->sc_dev, "%s: sc_inreset_cnt > 0; bailing\n",
1764 __func__);
1765 error = EIO;
1766 ATH_PCU_UNLOCK(sc);

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

1780
1781 /*
1782 * Enforce how deep the multicast queue can grow.
1783 *
1784 * XXX duplicated in ath_tx_start().
1785 */
1786 if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
1787 ATH_TXQ_LOCK(sc->sc_cabq);
1793 ATH_TXQ_LOCK(&avp->av_mcastq);
1794
1788
1795 if ((sc->sc_cabq->axq_depth + avp->av_mcastq.axq_depth) >
1796 sc->sc_txq_mcastq_maxdepth) {
1789 if (sc->sc_cabq->axq_depth > sc->sc_txq_mcastq_maxdepth) {
1797 sc->sc_stats.ast_tx_mcastq_overflow++;
1798 error = ENOBUFS;
1799 }
1800
1790 sc->sc_stats.ast_tx_mcastq_overflow++;
1791 error = ENOBUFS;
1792 }
1793
1801 ATH_TXQ_UNLOCK(&avp->av_mcastq);
1802 ATH_TXQ_UNLOCK(sc->sc_cabq);
1803
1804 if (error != 0) {
1805 m_freem(m);
1806 goto bad;
1807 }
1808 }
1809

--- 2240 unchanged lines hidden ---
1794 ATH_TXQ_UNLOCK(sc->sc_cabq);
1795
1796 if (error != 0) {
1797 m_freem(m);
1798 goto bad;
1799 }
1800 }
1801

--- 2240 unchanged lines hidden ---