1e60c4fc2SAdrian Chadd /*- 2e60c4fc2SAdrian Chadd * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3e60c4fc2SAdrian Chadd * All rights reserved. 4e60c4fc2SAdrian Chadd * 5e60c4fc2SAdrian Chadd * Redistribution and use in source and binary forms, with or without 6e60c4fc2SAdrian Chadd * modification, are permitted provided that the following conditions 7e60c4fc2SAdrian Chadd * are met: 8e60c4fc2SAdrian Chadd * 1. Redistributions of source code must retain the above copyright 9e60c4fc2SAdrian Chadd * notice, this list of conditions and the following disclaimer, 10e60c4fc2SAdrian Chadd * without modification. 11e60c4fc2SAdrian Chadd * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12e60c4fc2SAdrian Chadd * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 13e60c4fc2SAdrian Chadd * redistribution must be conditioned upon including a substantially 14e60c4fc2SAdrian Chadd * similar Disclaimer requirement for further binary redistribution. 15e60c4fc2SAdrian Chadd * 16e60c4fc2SAdrian Chadd * NO WARRANTY 17e60c4fc2SAdrian Chadd * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18e60c4fc2SAdrian Chadd * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19e60c4fc2SAdrian Chadd * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 20e60c4fc2SAdrian Chadd * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 21e60c4fc2SAdrian Chadd * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22e60c4fc2SAdrian Chadd * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23e60c4fc2SAdrian Chadd * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24e60c4fc2SAdrian Chadd * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25e60c4fc2SAdrian Chadd * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26e60c4fc2SAdrian Chadd * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27e60c4fc2SAdrian Chadd * THE POSSIBILITY OF SUCH DAMAGES. 28e60c4fc2SAdrian Chadd * 29e60c4fc2SAdrian Chadd * $FreeBSD$ 30e60c4fc2SAdrian Chadd */ 31e60c4fc2SAdrian Chadd #ifndef __IF_ATH_RX_H__ 32e60c4fc2SAdrian Chadd #define __IF_ATH_RX_H__ 33e60c4fc2SAdrian Chadd 34e60c4fc2SAdrian Chadd extern u_int32_t ath_calcrxfilter(struct ath_softc *sc); 35e60c4fc2SAdrian Chadd extern void ath_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m, 36e60c4fc2SAdrian Chadd int subtype, int rssi, int nf); 37f8cc9b09SAdrian Chadd 38f8cc9b09SAdrian Chadd #define ath_stoprecv(_sc, _dodelay) \ 39f8cc9b09SAdrian Chadd (_sc)->sc_rx.recv_stop((_sc), (_dodelay)) 40f8cc9b09SAdrian Chadd #define ath_startrecv(_sc) \ 41f8cc9b09SAdrian Chadd (_sc)->sc_rx.recv_start((_sc)) 42f8cc9b09SAdrian Chadd #define ath_rx_flush(_sc) \ 43f8cc9b09SAdrian Chadd (_sc)->sc_rx.recv_flush((_sc)) 44f8cc9b09SAdrian Chadd #define ath_rxbuf_init(_sc, _bf) \ 45f8cc9b09SAdrian Chadd (_sc)->sc_rx.recv_rxbuf_init((_sc), (_bf)) 463d184db2SAdrian Chadd #define ath_rxdma_setup(_sc) \ 473d184db2SAdrian Chadd (_sc)->sc_rx.recv_setup(_sc) 483d184db2SAdrian Chadd #define ath_rxdma_teardown(_sc) \ 493d184db2SAdrian Chadd (_sc)->sc_rx.recv_teardown(_sc) 50f8cc9b09SAdrian Chadd 51f8cc9b09SAdrian Chadd #if 0 52f8cc9b09SAdrian Chadd extern int ath_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf); 53e60c4fc2SAdrian Chadd extern void ath_rx_tasklet(void *arg, int npending); 54e60c4fc2SAdrian Chadd extern void ath_rx_proc(struct ath_softc *sc, int resched); 55e60c4fc2SAdrian Chadd extern void ath_stoprecv(struct ath_softc *sc, int dodelay); 56e60c4fc2SAdrian Chadd extern int ath_startrecv(struct ath_softc *sc); 57f8cc9b09SAdrian Chadd #endif 58f8cc9b09SAdrian Chadd 59d434a377SAdrian Chadd extern int ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, 60d434a377SAdrian Chadd HAL_STATUS status, uint64_t tsf, int nf, HAL_RX_QUEUE qtype, 61*8cc724d9SAdrian Chadd struct ath_buf *bf, struct mbuf *m); 62d434a377SAdrian Chadd 63f8cc9b09SAdrian Chadd extern void ath_recv_setup_legacy(struct ath_softc *sc); 64e60c4fc2SAdrian Chadd 65e60c4fc2SAdrian Chadd #endif 66