1235676Sadrian/*-
2235676Sadrian * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
3235676Sadrian * All rights reserved.
4235676Sadrian *
5235676Sadrian * Redistribution and use in source and binary forms, with or without
6235676Sadrian * modification, are permitted provided that the following conditions
7235676Sadrian * are met:
8235676Sadrian * 1. Redistributions of source code must retain the above copyright
9235676Sadrian *    notice, this list of conditions and the following disclaimer,
10235676Sadrian *    without modification.
11235676Sadrian * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12235676Sadrian *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
13235676Sadrian *    redistribution must be conditioned upon including a substantially
14235676Sadrian *    similar Disclaimer requirement for further binary redistribution.
15235676Sadrian *
16235676Sadrian * NO WARRANTY
17235676Sadrian * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18235676Sadrian * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19235676Sadrian * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
20235676Sadrian * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21235676Sadrian * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22235676Sadrian * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23235676Sadrian * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24235676Sadrian * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25235676Sadrian * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26235676Sadrian * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27235676Sadrian * THE POSSIBILITY OF SUCH DAMAGES.
28235676Sadrian *
29235676Sadrian * $FreeBSD: releng/10.3/sys/dev/ath/if_ath_rx.h 249085 2013-04-04 08:21:56Z adrian $
30235676Sadrian */
31235676Sadrian#ifndef	__IF_ATH_RX_H__
32235676Sadrian#define	__IF_ATH_RX_H__
33235676Sadrian
34235676Sadrianextern	u_int32_t ath_calcrxfilter(struct ath_softc *sc);
35235676Sadrianextern	void ath_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m,
36235676Sadrian	    int subtype, int rssi, int nf);
37238055Sadrian
38238055Sadrian#define	ath_stoprecv(_sc, _dodelay)		\
39238055Sadrian	    (_sc)->sc_rx.recv_stop((_sc), (_dodelay))
40238055Sadrian#define	ath_startrecv(_sc)			\
41238055Sadrian	    (_sc)->sc_rx.recv_start((_sc))
42238055Sadrian#define	ath_rx_flush(_sc)			\
43238055Sadrian	    (_sc)->sc_rx.recv_flush((_sc))
44238055Sadrian#define	ath_rxbuf_init(_sc, _bf)		\
45238055Sadrian	    (_sc)->sc_rx.recv_rxbuf_init((_sc), (_bf))
46238284Sadrian#define	ath_rxdma_setup(_sc)			\
47238284Sadrian	    (_sc)->sc_rx.recv_setup(_sc)
48238284Sadrian#define	ath_rxdma_teardown(_sc)			\
49238284Sadrian	    (_sc)->sc_rx.recv_teardown(_sc)
50238055Sadrian
51238055Sadrian#if 0
52238055Sadrianextern	int ath_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf);
53235676Sadrianextern	void ath_rx_tasklet(void *arg, int npending);
54235676Sadrianextern	void ath_rx_proc(struct ath_softc *sc, int resched);
55235676Sadrianextern	void ath_stoprecv(struct ath_softc *sc, int dodelay);
56235676Sadrianextern	int ath_startrecv(struct ath_softc *sc);
57238055Sadrian#endif
58235676Sadrian
59238316Sadrianextern	int ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs,
60238316Sadrian	    HAL_STATUS status, uint64_t tsf, int nf, HAL_RX_QUEUE qtype,
61249085Sadrian	    struct ath_buf *bf, struct mbuf *m);
62238316Sadrian
63238055Sadrianextern	void ath_recv_setup_legacy(struct ath_softc *sc);
64238055Sadrian
65235676Sadrian#endif
66