Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ath/if_ath_tx.c
Context not available. | |||||
uint16_t flags; | uint16_t flags; | ||||
int shortPreamble; | int shortPreamble; | ||||
const HAL_RATE_TABLE *rt = sc->sc_currates; | const HAL_RATE_TABLE *rt = sc->sc_currates; | ||||
struct ifnet *ifp = sc->sc_ifp; | struct ieee80211com *ic = &sc->sc_ic; | ||||
struct ieee80211com *ic = ifp->if_l2com; | |||||
flags = bf->bf_state.bfs_txflags; | flags = bf->bf_state.bfs_txflags; | ||||
rix = bf->bf_state.bfs_rc[0].rix; | rix = bf->bf_state.bfs_rc[0].rix; | ||||
Context not available. | |||||
{ | { | ||||
struct ieee80211vap *vap = ni->ni_vap; | struct ieee80211vap *vap = ni->ni_vap; | ||||
struct ath_hal *ah = sc->sc_ah; | struct ath_hal *ah = sc->sc_ah; | ||||
struct ifnet *ifp = sc->sc_ifp; | struct ieee80211com *ic = &sc->sc_ic; | ||||
struct ieee80211com *ic = ifp->if_l2com; | |||||
const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams; | const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams; | ||||
int error, iswep, ismcast, isfrag, ismrr; | int error, iswep, ismcast, isfrag, ismrr; | ||||
int keyix, hdrlen, pktlen, try0 = 0; | int keyix, hdrlen, pktlen, try0 = 0; | ||||
Context not available. | |||||
struct ath_buf *bf, struct mbuf *m0, | struct ath_buf *bf, struct mbuf *m0, | ||||
const struct ieee80211_bpf_params *params) | const struct ieee80211_bpf_params *params) | ||||
{ | { | ||||
struct ifnet *ifp = sc->sc_ifp; | struct ieee80211com *ic = &sc->sc_ic; | ||||
struct ieee80211com *ic = ifp->if_l2com; | |||||
struct ath_hal *ah = sc->sc_ah; | struct ath_hal *ah = sc->sc_ah; | ||||
struct ieee80211vap *vap = ni->ni_vap; | struct ieee80211vap *vap = ni->ni_vap; | ||||
int error, ismcast, ismrr; | int error, ismcast, ismrr; | ||||
Context not available. | |||||
const struct ieee80211_bpf_params *params) | const struct ieee80211_bpf_params *params) | ||||
{ | { | ||||
struct ieee80211com *ic = ni->ni_ic; | struct ieee80211com *ic = ni->ni_ic; | ||||
struct ifnet *ifp = ic->ic_ifp; | struct ath_softc *sc = ic->ic_softc; | ||||
struct ath_softc *sc = ifp->if_softc; | |||||
struct ath_buf *bf; | struct ath_buf *bf; | ||||
struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); | struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); | ||||
int error = 0; | int error = 0; | ||||
Context not available. | |||||
ATH_TX_LOCK(sc); | ATH_TX_LOCK(sc); | ||||
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->sc_invalid) { | if (!sc->sc_running || sc->sc_invalid) { | ||||
DPRINTF(sc, ATH_DEBUG_XMIT, "%s: discard frame, %s", __func__, | DPRINTF(sc, ATH_DEBUG_XMIT, "%s: discard frame, r/i: %d/%d", | ||||
(ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ? | __func__, sc->sc_running, sc->sc_invalid); | ||||
"!running" : "invalid"); | |||||
m_freem(m); | m_freem(m); | ||||
error = ENETDOWN; | error = ENETDOWN; | ||||
goto bad; | goto bad; | ||||
Context not available. | |||||
} | } | ||||
} | } | ||||
sc->sc_wd_timer = 5; | sc->sc_wd_timer = 5; | ||||
if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); | |||||
sc->sc_stats.ast_tx_raw++; | sc->sc_stats.ast_tx_raw++; | ||||
/* | /* | ||||
Context not available. | |||||
badbad: | badbad: | ||||
ATH_KTR(sc, ATH_KTR_TX, 2, "ath_raw_xmit: bad0: m=%p, params=%p", | ATH_KTR(sc, ATH_KTR_TX, 2, "ath_raw_xmit: bad0: m=%p, params=%p", | ||||
m, params); | m, params); | ||||
if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); | |||||
sc->sc_stats.ast_tx_raw_fail++; | sc->sc_stats.ast_tx_raw_fail++; | ||||
ieee80211_free_node(ni); | ieee80211_free_node(ni); | ||||
Context not available. | |||||
ath_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, | ath_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, | ||||
int dialogtoken, int baparamset, int batimeout) | int dialogtoken, int baparamset, int batimeout) | ||||
{ | { | ||||
struct ath_softc *sc = ni->ni_ic->ic_ifp->if_softc; | struct ath_softc *sc = ni->ni_ic->ic_softc; | ||||
int tid = tap->txa_tid; | int tid = tap->txa_tid; | ||||
struct ath_node *an = ATH_NODE(ni); | struct ath_node *an = ATH_NODE(ni); | ||||
struct ath_tid *atid = &an->an_tid[tid]; | struct ath_tid *atid = &an->an_tid[tid]; | ||||
Context not available. | |||||
ath_addba_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, | ath_addba_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, | ||||
int status, int code, int batimeout) | int status, int code, int batimeout) | ||||
{ | { | ||||
struct ath_softc *sc = ni->ni_ic->ic_ifp->if_softc; | struct ath_softc *sc = ni->ni_ic->ic_softc; | ||||
int tid = tap->txa_tid; | int tid = tap->txa_tid; | ||||
struct ath_node *an = ATH_NODE(ni); | struct ath_node *an = ATH_NODE(ni); | ||||
struct ath_tid *atid = &an->an_tid[tid]; | struct ath_tid *atid = &an->an_tid[tid]; | ||||
Context not available. | |||||
void | void | ||||
ath_addba_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap) | ath_addba_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap) | ||||
{ | { | ||||
struct ath_softc *sc = ni->ni_ic->ic_ifp->if_softc; | struct ath_softc *sc = ni->ni_ic->ic_softc; | ||||
int tid = tap->txa_tid; | int tid = tap->txa_tid; | ||||
struct ath_node *an = ATH_NODE(ni); | struct ath_node *an = ATH_NODE(ni); | ||||
struct ath_tid *atid = &an->an_tid[tid]; | struct ath_tid *atid = &an->an_tid[tid]; | ||||
Context not available. | |||||
ath_bar_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, | ath_bar_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, | ||||
int status) | int status) | ||||
{ | { | ||||
struct ath_softc *sc = ni->ni_ic->ic_ifp->if_softc; | struct ath_softc *sc = ni->ni_ic->ic_softc; | ||||
int tid = tap->txa_tid; | int tid = tap->txa_tid; | ||||
struct ath_node *an = ATH_NODE(ni); | struct ath_node *an = ATH_NODE(ni); | ||||
struct ath_tid *atid = &an->an_tid[tid]; | struct ath_tid *atid = &an->an_tid[tid]; | ||||
Context not available. | |||||
ath_addba_response_timeout(struct ieee80211_node *ni, | ath_addba_response_timeout(struct ieee80211_node *ni, | ||||
struct ieee80211_tx_ampdu *tap) | struct ieee80211_tx_ampdu *tap) | ||||
{ | { | ||||
struct ath_softc *sc = ni->ni_ic->ic_ifp->if_softc; | struct ath_softc *sc = ni->ni_ic->ic_softc; | ||||
int tid = tap->txa_tid; | int tid = tap->txa_tid; | ||||
struct ath_node *an = ATH_NODE(ni); | struct ath_node *an = ATH_NODE(ni); | ||||
struct ath_tid *atid = &an->an_tid[tid]; | struct ath_tid *atid = &an->an_tid[tid]; | ||||
Context not available. |