Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ath/if_ath_rx.c
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | |||||
* - when operating in mesh mode to detect neighbors | * - when operating in mesh mode to detect neighbors | ||||
* o accept control frames: | * o accept control frames: | ||||
* - when in monitor mode | * - when in monitor mode | ||||
* XXX HT protection for 11n | * XXX HT protection for 11n | ||||
*/ | */ | ||||
u_int32_t | u_int32_t | ||||
ath_calcrxfilter(struct ath_softc *sc) | ath_calcrxfilter(struct ath_softc *sc) | ||||
{ | { | ||||
struct ifnet *ifp = sc->sc_ifp; | struct ieee80211com *ic = &sc->sc_ic; | ||||
struct ieee80211com *ic = ifp->if_l2com; | |||||
u_int32_t rfilt; | u_int32_t rfilt; | ||||
rfilt = HAL_RX_FILTER_UCAST | HAL_RX_FILTER_BCAST | HAL_RX_FILTER_MCAST; | rfilt = HAL_RX_FILTER_UCAST | HAL_RX_FILTER_BCAST | HAL_RX_FILTER_MCAST; | ||||
if (!sc->sc_needmib && !sc->sc_scanning) | if (!sc->sc_needmib && !sc->sc_scanning) | ||||
rfilt |= HAL_RX_FILTER_PHYERR; | rfilt |= HAL_RX_FILTER_PHYERR; | ||||
if (ic->ic_opmode != IEEE80211_M_STA) | if (ic->ic_opmode != IEEE80211_M_STA) | ||||
rfilt |= HAL_RX_FILTER_PROBEREQ; | rfilt |= HAL_RX_FILTER_PROBEREQ; | ||||
/* XXX ic->ic_monvaps != 0? */ | /* XXX ic->ic_monvaps != 0? */ | ||||
if (ic->ic_opmode == IEEE80211_M_MONITOR || (ifp->if_flags & IFF_PROMISC)) | if (ic->ic_opmode == IEEE80211_M_MONITOR || ic->ic_promisc > 0) | ||||
rfilt |= HAL_RX_FILTER_PROM; | rfilt |= HAL_RX_FILTER_PROM; | ||||
/* | /* | ||||
* Only listen to all beacons if we're scanning. | * Only listen to all beacons if we're scanning. | ||||
* | * | ||||
* Otherwise we only really need to hear beacons from | * Otherwise we only really need to hear beacons from | ||||
* our own BSSID. | * our own BSSID. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | |||||
* Intercept management frames to collect beacon rssi data | * Intercept management frames to collect beacon rssi data | ||||
* and to do ibss merges. | * and to do ibss merges. | ||||
*/ | */ | ||||
void | void | ||||
ath_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m, | ath_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m, | ||||
int subtype, const struct ieee80211_rx_stats *rxs, int rssi, int nf) | int subtype, const struct ieee80211_rx_stats *rxs, int rssi, int nf) | ||||
{ | { | ||||
struct ieee80211vap *vap = ni->ni_vap; | struct ieee80211vap *vap = ni->ni_vap; | ||||
struct ath_softc *sc = vap->iv_ic->ic_ifp->if_softc; | struct ath_softc *sc = vap->iv_ic->ic_softc; | ||||
uint64_t tsf_beacon_old, tsf_beacon; | uint64_t tsf_beacon_old, tsf_beacon; | ||||
uint64_t nexttbtt; | uint64_t nexttbtt; | ||||
int64_t tsf_delta; | int64_t tsf_delta; | ||||
int32_t tsf_delta_bmiss; | int32_t tsf_delta_bmiss; | ||||
int32_t tsf_remainder; | int32_t tsf_remainder; | ||||
uint64_t tsf_beacon_target; | uint64_t tsf_beacon_target; | ||||
int tsf_intval; | int tsf_intval; | ||||
▲ Show 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | if (vap->iv_opmode == IEEE80211_M_IBSS && | ||||
} | } | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT | #ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT | ||||
static void | static void | ||||
ath_rx_tap_vendor(struct ifnet *ifp, struct mbuf *m, | ath_rx_tap_vendor(struct ath_softc *sc, struct mbuf *m, | ||||
const struct ath_rx_status *rs, u_int64_t tsf, int16_t nf) | const struct ath_rx_status *rs, u_int64_t tsf, int16_t nf) | ||||
{ | { | ||||
struct ath_softc *sc = ifp->if_softc; | |||||
/* Fill in the extension bitmap */ | /* Fill in the extension bitmap */ | ||||
sc->sc_rx_th.wr_ext_bitmap = htole32(1 << ATH_RADIOTAP_VENDOR_HEADER); | sc->sc_rx_th.wr_ext_bitmap = htole32(1 << ATH_RADIOTAP_VENDOR_HEADER); | ||||
/* Fill in the vendor header */ | /* Fill in the vendor header */ | ||||
sc->sc_rx_th.wr_vh.vh_oui[0] = 0x7f; | sc->sc_rx_th.wr_vh.vh_oui[0] = 0x7f; | ||||
sc->sc_rx_th.wr_vh.vh_oui[1] = 0x03; | sc->sc_rx_th.wr_vh.vh_oui[1] = 0x03; | ||||
sc->sc_rx_th.wr_vh.vh_oui[2] = 0x00; | sc->sc_rx_th.wr_vh.vh_oui[2] = 0x00; | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | if (rs->rs_status & HAL_RXERR_PHY) { | ||||
sc->sc_rx_th.wr_v.vh_phyerr_code = 0xff; | sc->sc_rx_th.wr_v.vh_phyerr_code = 0xff; | ||||
} | } | ||||
sc->sc_rx_th.wr_v.vh_rs_status = rs->rs_status; | sc->sc_rx_th.wr_v.vh_rs_status = rs->rs_status; | ||||
sc->sc_rx_th.wr_v.vh_rssi = rs->rs_rssi; | sc->sc_rx_th.wr_v.vh_rssi = rs->rs_rssi; | ||||
} | } | ||||
#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ | #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ | ||||
static void | static void | ||||
ath_rx_tap(struct ifnet *ifp, struct mbuf *m, | ath_rx_tap(struct ath_softc *sc, struct mbuf *m, | ||||
const struct ath_rx_status *rs, u_int64_t tsf, int16_t nf) | const struct ath_rx_status *rs, u_int64_t tsf, int16_t nf) | ||||
{ | { | ||||
#define CHAN_HT20 htole32(IEEE80211_CHAN_HT20) | #define CHAN_HT20 htole32(IEEE80211_CHAN_HT20) | ||||
#define CHAN_HT40U htole32(IEEE80211_CHAN_HT40U) | #define CHAN_HT40U htole32(IEEE80211_CHAN_HT40U) | ||||
#define CHAN_HT40D htole32(IEEE80211_CHAN_HT40D) | #define CHAN_HT40D htole32(IEEE80211_CHAN_HT40D) | ||||
#define CHAN_HT (CHAN_HT20|CHAN_HT40U|CHAN_HT40D) | #define CHAN_HT (CHAN_HT20|CHAN_HT40U|CHAN_HT40D) | ||||
struct ath_softc *sc = ifp->if_softc; | |||||
const HAL_RATE_TABLE *rt; | const HAL_RATE_TABLE *rt; | ||||
uint8_t rix; | uint8_t rix; | ||||
rt = sc->sc_currates; | rt = sc->sc_currates; | ||||
KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); | KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); | ||||
rix = rt->rateCodeToIndex[rs->rs_rate]; | rix = rt->rateCodeToIndex[rs->rs_rate]; | ||||
sc->sc_rx_th.wr_rate = sc->sc_hwmap[rix].ieeerate; | sc->sc_rx_th.wr_rate = sc->sc_hwmap[rix].ieeerate; | ||||
sc->sc_rx_th.wr_flags = sc->sc_hwmap[rix].rxflags; | sc->sc_rx_th.wr_flags = sc->sc_hwmap[rix].rxflags; | ||||
#ifdef AH_SUPPORT_AR5416 | #ifdef AH_SUPPORT_AR5416 | ||||
sc->sc_rx_th.wr_chan_flags &= ~CHAN_HT; | sc->sc_rx_th.wr_chan_flags &= ~CHAN_HT; | ||||
if (rs->rs_status & HAL_RXERR_PHY) { | if (rs->rs_status & HAL_RXERR_PHY) { | ||||
/* | /* | ||||
* PHY error - make sure the channel flags | * PHY error - make sure the channel flags | ||||
* reflect the actual channel configuration, | * reflect the actual channel configuration, | ||||
* not the received frame. | * not the received frame. | ||||
*/ | */ | ||||
if (IEEE80211_IS_CHAN_HT40U(sc->sc_curchan)) | if (IEEE80211_IS_CHAN_HT40U(sc->sc_curchan)) | ||||
sc->sc_rx_th.wr_chan_flags |= CHAN_HT40U; | sc->sc_rx_th.wr_chan_flags |= CHAN_HT40U; | ||||
else if (IEEE80211_IS_CHAN_HT40D(sc->sc_curchan)) | else if (IEEE80211_IS_CHAN_HT40D(sc->sc_curchan)) | ||||
sc->sc_rx_th.wr_chan_flags |= CHAN_HT40D; | sc->sc_rx_th.wr_chan_flags |= CHAN_HT40D; | ||||
else if (IEEE80211_IS_CHAN_HT20(sc->sc_curchan)) | else if (IEEE80211_IS_CHAN_HT20(sc->sc_curchan)) | ||||
sc->sc_rx_th.wr_chan_flags |= CHAN_HT20; | sc->sc_rx_th.wr_chan_flags |= CHAN_HT20; | ||||
} else if (sc->sc_rx_th.wr_rate & IEEE80211_RATE_MCS) { /* HT rate */ | } else if (sc->sc_rx_th.wr_rate & IEEE80211_RATE_MCS) { /* HT rate */ | ||||
struct ieee80211com *ic = ifp->if_l2com; | struct ieee80211com *ic = &sc->sc_ic; | ||||
if ((rs->rs_flags & HAL_RX_2040) == 0) | if ((rs->rs_flags & HAL_RX_2040) == 0) | ||||
sc->sc_rx_th.wr_chan_flags |= CHAN_HT20; | sc->sc_rx_th.wr_chan_flags |= CHAN_HT20; | ||||
else if (IEEE80211_IS_CHAN_HT40U(ic->ic_curchan)) | else if (IEEE80211_IS_CHAN_HT40U(ic->ic_curchan)) | ||||
sc->sc_rx_th.wr_chan_flags |= CHAN_HT40U; | sc->sc_rx_th.wr_chan_flags |= CHAN_HT40U; | ||||
else | else | ||||
sc->sc_rx_th.wr_chan_flags |= CHAN_HT40D; | sc->sc_rx_th.wr_chan_flags |= CHAN_HT40D; | ||||
if ((rs->rs_flags & HAL_RX_GI) == 0) | if ((rs->rs_flags & HAL_RX_GI) == 0) | ||||
Show All 40 Lines | |||||
*/ | */ | ||||
int | int | ||||
ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, | ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, | ||||
uint64_t tsf, int nf, HAL_RX_QUEUE qtype, struct ath_buf *bf, | uint64_t tsf, int nf, HAL_RX_QUEUE qtype, struct ath_buf *bf, | ||||
struct mbuf *m) | struct mbuf *m) | ||||
{ | { | ||||
uint64_t rstamp; | uint64_t rstamp; | ||||
int len, type; | int len, type; | ||||
struct ifnet *ifp = sc->sc_ifp; | struct ieee80211com *ic = &sc->sc_ic; | ||||
struct ieee80211com *ic = ifp->if_l2com; | |||||
struct ieee80211_node *ni; | struct ieee80211_node *ni; | ||||
int is_good = 0; | int is_good = 0; | ||||
struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; | struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; | ||||
/* | /* | ||||
* Calculate the correct 64 bit TSF given | * Calculate the correct 64 bit TSF given | ||||
* the TSF64 register value and rs_tstamp. | * the TSF64 register value and rs_tstamp. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | if (rs->rs_status & HAL_RXERR_MIC) { | ||||
len = rs->rs_datalen; | len = rs->rs_datalen; | ||||
if (len >= sizeof (struct ieee80211_frame)) { | if (len >= sizeof (struct ieee80211_frame)) { | ||||
ath_handle_micerror(ic, | ath_handle_micerror(ic, | ||||
mtod(m, struct ieee80211_frame *), | mtod(m, struct ieee80211_frame *), | ||||
sc->sc_splitmic ? | sc->sc_splitmic ? | ||||
rs->rs_keyix-32 : rs->rs_keyix); | rs->rs_keyix-32 : rs->rs_keyix); | ||||
} | } | ||||
} | } | ||||
if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); | counter_u64_add(ic->ic_ierrors, 1); | ||||
rx_error: | rx_error: | ||||
/* | /* | ||||
* Cleanup any pending partial frame. | * Cleanup any pending partial frame. | ||||
*/ | */ | ||||
if (re->m_rxpending != NULL) { | if (re->m_rxpending != NULL) { | ||||
m_freem(re->m_rxpending); | m_freem(re->m_rxpending); | ||||
re->m_rxpending = NULL; | re->m_rxpending = NULL; | ||||
} | } | ||||
/* | /* | ||||
* When a tap is present pass error frames | * When a tap is present pass error frames | ||||
* that have been requested. By default we | * that have been requested. By default we | ||||
* pass decrypt+mic errors but others may be | * pass decrypt+mic errors but others may be | ||||
* interesting (e.g. crc). | * interesting (e.g. crc). | ||||
*/ | */ | ||||
if (ieee80211_radiotap_active(ic) && | if (ieee80211_radiotap_active(ic) && | ||||
(rs->rs_status & sc->sc_monpass)) { | (rs->rs_status & sc->sc_monpass)) { | ||||
/* NB: bpf needs the mbuf length setup */ | /* NB: bpf needs the mbuf length setup */ | ||||
len = rs->rs_datalen; | len = rs->rs_datalen; | ||||
m->m_pkthdr.len = m->m_len = len; | m->m_pkthdr.len = m->m_len = len; | ||||
ath_rx_tap(ifp, m, rs, rstamp, nf); | ath_rx_tap(sc, m, rs, rstamp, nf); | ||||
#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT | #ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT | ||||
ath_rx_tap_vendor(ifp, m, rs, rstamp, nf); | ath_rx_tap_vendor(sc, m, rs, rstamp, nf); | ||||
#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ | #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ | ||||
ieee80211_radiotap_rx_all(ic, m); | ieee80211_radiotap_rx_all(ic, m); | ||||
} | } | ||||
/* XXX pass MIC errors up for s/w reclaculation */ | /* XXX pass MIC errors up for s/w reclaculation */ | ||||
m_freem(m); m = NULL; | m_freem(m); m = NULL; | ||||
goto rx_next; | goto rx_next; | ||||
} | } | ||||
rx_accept: | rx_accept: | ||||
len = rs->rs_datalen; | len = rs->rs_datalen; | ||||
m->m_len = len; | m->m_len = len; | ||||
if (rs->rs_more) { | if (rs->rs_more) { | ||||
/* | /* | ||||
* Frame spans multiple descriptors; save | * Frame spans multiple descriptors; save | ||||
* it for the next completed descriptor, it | * it for the next completed descriptor, it | ||||
* will be used to construct a jumbogram. | * will be used to construct a jumbogram. | ||||
*/ | */ | ||||
if (re->m_rxpending != NULL) { | if (re->m_rxpending != NULL) { | ||||
/* NB: max frame size is currently 2 clusters */ | /* NB: max frame size is currently 2 clusters */ | ||||
sc->sc_stats.ast_rx_toobig++; | sc->sc_stats.ast_rx_toobig++; | ||||
m_freem(re->m_rxpending); | m_freem(re->m_rxpending); | ||||
} | } | ||||
m->m_pkthdr.rcvif = ifp; | |||||
m->m_pkthdr.len = len; | m->m_pkthdr.len = len; | ||||
re->m_rxpending = m; | re->m_rxpending = m; | ||||
m = NULL; | m = NULL; | ||||
goto rx_next; | goto rx_next; | ||||
} else if (re->m_rxpending != NULL) { | } else if (re->m_rxpending != NULL) { | ||||
/* | /* | ||||
* This is the second part of a jumbogram, | * This is the second part of a jumbogram, | ||||
* chain it to the first mbuf, adjust the | * chain it to the first mbuf, adjust the | ||||
* frame length, and clear the rxpending state. | * frame length, and clear the rxpending state. | ||||
*/ | */ | ||||
re->m_rxpending->m_next = m; | re->m_rxpending->m_next = m; | ||||
re->m_rxpending->m_pkthdr.len += len; | re->m_rxpending->m_pkthdr.len += len; | ||||
m = re->m_rxpending; | m = re->m_rxpending; | ||||
re->m_rxpending = NULL; | re->m_rxpending = NULL; | ||||
} else { | } else { | ||||
/* | /* | ||||
* Normal single-descriptor receive; setup | * Normal single-descriptor receive; setup packet length. | ||||
* the rcvif and packet length. | |||||
*/ | */ | ||||
m->m_pkthdr.rcvif = ifp; | |||||
m->m_pkthdr.len = len; | m->m_pkthdr.len = len; | ||||
} | } | ||||
/* | /* | ||||
* Validate rs->rs_antenna. | * Validate rs->rs_antenna. | ||||
* | * | ||||
* Some users w/ AR9285 NICs have reported crashes | * Some users w/ AR9285 NICs have reported crashes | ||||
* here because rs_antenna field is bogusly large. | * here because rs_antenna field is bogusly large. | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | rs->rs_antenna |= | ||||
((rs->rs_rssi_ctl[2] & HAL_RX_LNA_CFG_USED) | ((rs->rs_rssi_ctl[2] & HAL_RX_LNA_CFG_USED) | ||||
>> HAL_RX_LNA_CFG_USED_S); | >> HAL_RX_LNA_CFG_USED_S); | ||||
/* Bit 2 - the external RX antenna switch */ | /* Bit 2 - the external RX antenna switch */ | ||||
if (rs->rs_rssi_ctl[2] & HAL_RX_LNA_EXTCFG) | if (rs->rs_rssi_ctl[2] & HAL_RX_LNA_EXTCFG) | ||||
rs->rs_antenna |= 0x4; | rs->rs_antenna |= 0x4; | ||||
} | } | ||||
if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); | |||||
sc->sc_stats.ast_ant_rx[rs->rs_antenna]++; | sc->sc_stats.ast_ant_rx[rs->rs_antenna]++; | ||||
/* | /* | ||||
* Populate the rx status block. When there are bpf | * Populate the rx status block. When there are bpf | ||||
* listeners we do the additional work to provide | * listeners we do the additional work to provide | ||||
* complete status. Otherwise we fill in only the | * complete status. Otherwise we fill in only the | ||||
* material required by ieee80211_input. Note that | * material required by ieee80211_input. Note that | ||||
* noise setting is filled in above. | * noise setting is filled in above. | ||||
*/ | */ | ||||
if (ieee80211_radiotap_active(ic)) { | if (ieee80211_radiotap_active(ic)) { | ||||
ath_rx_tap(ifp, m, rs, rstamp, nf); | ath_rx_tap(sc, m, rs, rstamp, nf); | ||||
#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT | #ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT | ||||
ath_rx_tap_vendor(ifp, m, rs, rstamp, nf); | ath_rx_tap_vendor(sc, m, rs, rstamp, nf); | ||||
#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ | #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ | ||||
} | } | ||||
/* | /* | ||||
* From this point on we assume the frame is at least | * From this point on we assume the frame is at least | ||||
* as large as ieee80211_frame_min; verify that. | * as large as ieee80211_frame_min; verify that. | ||||
*/ | */ | ||||
if (len < IEEE80211_MIN_LEN) { | if (len < IEEE80211_MIN_LEN) { | ||||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
static void | static void | ||||
ath_rx_proc(struct ath_softc *sc, int resched) | ath_rx_proc(struct ath_softc *sc, int resched) | ||||
{ | { | ||||
#define PA2DESC(_sc, _pa) \ | #define PA2DESC(_sc, _pa) \ | ||||
((struct ath_desc *)((caddr_t)(_sc)->sc_rxdma.dd_desc + \ | ((struct ath_desc *)((caddr_t)(_sc)->sc_rxdma.dd_desc + \ | ||||
((_pa) - (_sc)->sc_rxdma.dd_desc_paddr))) | ((_pa) - (_sc)->sc_rxdma.dd_desc_paddr))) | ||||
struct ath_buf *bf; | struct ath_buf *bf; | ||||
struct ifnet *ifp = sc->sc_ifp; | |||||
struct ath_hal *ah = sc->sc_ah; | struct ath_hal *ah = sc->sc_ah; | ||||
#ifdef IEEE80211_SUPPORT_SUPERG | #ifdef IEEE80211_SUPPORT_SUPERG | ||||
struct ieee80211com *ic = ifp->if_l2com; | struct ieee80211com *ic = &sc->sc_ic; | ||||
#endif | #endif | ||||
struct ath_desc *ds; | struct ath_desc *ds; | ||||
struct ath_rx_status *rs; | struct ath_rx_status *rs; | ||||
struct mbuf *m; | struct mbuf *m; | ||||
int ngood; | int ngood; | ||||
HAL_STATUS status; | HAL_STATUS status; | ||||
int16_t nf; | int16_t nf; | ||||
u_int64_t tsf; | u_int64_t tsf; | ||||
▲ Show 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | #else | ||||
ath_hal_startpcurecv(ah); /* re-enable PCU/DMA engine */ | ath_hal_startpcurecv(ah); /* re-enable PCU/DMA engine */ | ||||
#endif | #endif | ||||
ath_hal_intrset(ah, sc->sc_imask); | ath_hal_intrset(ah, sc->sc_imask); | ||||
sc->sc_kickpcu = 0; | sc->sc_kickpcu = 0; | ||||
ATH_PCU_UNLOCK(sc); | ATH_PCU_UNLOCK(sc); | ||||
} | } | ||||
/* XXX check this inside of IF_LOCK? */ | |||||
if (resched && (ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) { | |||||
#ifdef IEEE80211_SUPPORT_SUPERG | #ifdef IEEE80211_SUPPORT_SUPERG | ||||
if (resched) | |||||
ieee80211_ff_age_all(ic, 100); | ieee80211_ff_age_all(ic, 100); | ||||
#endif | #endif | ||||
if (!IFQ_IS_EMPTY(&ifp->if_snd)) | |||||
ath_tx_kick(sc); | |||||
} | |||||
#undef PA2DESC | |||||
/* | /* | ||||
* Put the hardware to sleep again if we're done with it. | * Put the hardware to sleep again if we're done with it. | ||||
*/ | */ | ||||
ATH_LOCK(sc); | ATH_LOCK(sc); | ||||
ath_power_restore_power_state(sc); | ath_power_restore_power_state(sc); | ||||
ATH_UNLOCK(sc); | ATH_UNLOCK(sc); | ||||
/* | /* | ||||
* If we hit the maximum number of frames in this round, | * If we hit the maximum number of frames in this round, | ||||
* reschedule for another immediate pass. This gives | * reschedule for another immediate pass. This gives | ||||
* the TX and TX completion routines time to run, which | * the TX and TX completion routines time to run, which | ||||
* will reduce latency. | * will reduce latency. | ||||
*/ | */ | ||||
if (npkts >= ATH_RX_MAX) | if (npkts >= ATH_RX_MAX) | ||||
sc->sc_rx.recv_sched(sc, resched); | sc->sc_rx.recv_sched(sc, resched); | ||||
ATH_PCU_LOCK(sc); | ATH_PCU_LOCK(sc); | ||||
sc->sc_rxproc_cnt--; | sc->sc_rxproc_cnt--; | ||||
ATH_PCU_UNLOCK(sc); | ATH_PCU_UNLOCK(sc); | ||||
} | } | ||||
#undef PA2DESC | |||||
op: Style(9) issue here: please use tabulator instead of space after #undef. | |||||
#undef ATH_RX_MAX | #undef ATH_RX_MAX | ||||
/* | /* | ||||
* Only run the RX proc if it's not already running. | * Only run the RX proc if it's not already running. | ||||
* Since this may get run as part of the reset/flush path, | * Since this may get run as part of the reset/flush path, | ||||
* the task can't clash with an existing, running tasklet. | * the task can't clash with an existing, running tasklet. | ||||
*/ | */ | ||||
static void | static void | ||||
▲ Show 20 Lines • Show All 239 Lines • Show Last 20 Lines |
Style(9) issue here: please use tabulator instead of space after #undef.