The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/ic/rt2661var.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: rt2661var.h,v 1.8 2008/04/29 22:21:45 scw Exp $        */
    2 /*      $OpenBSD: rt2661var.h,v 1.4 2006/02/25 12:56:47 damien Exp $    */
    3 
    4 /*-
    5  * Copyright (c) 2006
    6  *      Damien Bergamini <damien.bergamini@free.fr>
    7  *
    8  * Permission to use, copy, modify, and distribute this software for any
    9  * purpose with or without fee is hereby granted, provided that the above
   10  * copyright notice and this permission notice appear in all copies.
   11  *
   12  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   13  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   14  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
   15  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   16  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   17  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   18  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   19  */
   20 
   21 struct rt2661_rx_radiotap_header {
   22         struct ieee80211_radiotap_header wr_ihdr;
   23         uint64_t        wr_tsf;
   24         uint8_t         wr_flags;
   25         uint8_t         wr_rate;
   26         uint16_t        wr_chan_freq;
   27         uint16_t        wr_chan_flags;
   28         uint8_t         wr_antsignal;
   29 } __packed;
   30 
   31 #define RT2661_RX_RADIOTAP_PRESENT                                      \
   32         ((1 << IEEE80211_RADIOTAP_TSFT) |                               \
   33          (1 << IEEE80211_RADIOTAP_FLAGS) |                              \
   34          (1 << IEEE80211_RADIOTAP_RATE) |                               \
   35          (1 << IEEE80211_RADIOTAP_CHANNEL) |                            \
   36          (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL))
   37 
   38 struct rt2661_tx_radiotap_header {
   39         struct ieee80211_radiotap_header wt_ihdr;
   40         uint8_t         wt_flags;
   41         uint8_t         wt_rate;
   42         uint16_t        wt_chan_freq;
   43         uint16_t        wt_chan_flags;
   44 } __packed;
   45 
   46 #define RT2661_TX_RADIOTAP_PRESENT                                      \
   47         ((1 << IEEE80211_RADIOTAP_FLAGS) |                              \
   48          (1 << IEEE80211_RADIOTAP_RATE) |                               \
   49          (1 << IEEE80211_RADIOTAP_CHANNEL))
   50 
   51 struct rt2661_tx_data {
   52         bus_dmamap_t                    map;
   53         struct mbuf                     *m;
   54         struct ieee80211_node           *ni;
   55 };
   56 
   57 struct rt2661_tx_ring {
   58         bus_dmamap_t            map;
   59         bus_dma_segment_t       seg;
   60         bus_addr_t              physaddr;
   61         struct rt2661_tx_desc   *desc;
   62         struct rt2661_tx_data   *data;
   63         int                     count;
   64         int                     queued;
   65         int                     cur;
   66         int                     next;
   67         int                     stat;
   68 };
   69 
   70 struct rt2661_rx_data {
   71         bus_dmamap_t    map;
   72         struct mbuf     *m;
   73 };
   74 
   75 struct rt2661_rx_ring {
   76         bus_dmamap_t            map;
   77         bus_dma_segment_t       seg;
   78         bus_addr_t              physaddr;
   79         struct rt2661_rx_desc   *desc;
   80         struct rt2661_rx_data   *data;
   81         int                     count;
   82         int                     cur;
   83         int                     next;
   84 };
   85 
   86 struct rt2661_node {
   87         struct ieee80211_node           ni;
   88         struct ieee80211_amrr_node      amn;
   89 };
   90 
   91 struct rt2661_softc {
   92         struct device                   sc_dev;
   93 
   94         struct ieee80211com             sc_ic;
   95         int                             (*sc_newstate)(struct ieee80211com *,
   96                                             enum ieee80211_state, int);
   97 
   98         int                             (*sc_enable)(struct rt2661_softc *);
   99         void                            (*sc_disable)(struct rt2661_softc *);
  100 
  101         bus_dma_tag_t                   sc_dmat;
  102         bus_space_tag_t                 sc_st;
  103         bus_space_handle_t              sc_sh;
  104 
  105         struct ethercom                 sc_ec;
  106 
  107         struct callout                  scan_ch;
  108         struct callout                  amrr_ch;
  109 
  110         int                             sc_id;
  111         int                             sc_flags;
  112 #define RT2661_ENABLED          (1 << 0)
  113 #define RT2661_FWLOADED         (1 << 1)
  114 #define RT2661_UPDATE_SLOT      (1 << 2)
  115 #define RT2661_SET_SLOTTIME     (1 << 3)
  116 
  117         int                             sc_tx_timer;
  118 
  119         struct ieee80211_channel        *sc_curchan;
  120         struct ieee80211_amrr           amrr;
  121 
  122         uint8_t                         rf_rev;
  123 
  124         uint8_t                         rfprog;
  125         uint8_t                         rffreq;
  126 
  127         struct rt2661_tx_ring           txq[5];
  128         struct rt2661_tx_ring           mgtq;
  129         struct rt2661_rx_ring           rxq;
  130 
  131         uint32_t                        rf_regs[4];
  132         int8_t                          txpow[38];
  133 
  134         struct {
  135                 uint8_t reg;
  136                 uint8_t val;
  137         }                               bbp_prom[16];
  138 
  139         int                             hw_radio;
  140         int                             rx_ant;
  141         int                             tx_ant;
  142         int                             nb_ant;
  143         int                             ext_2ghz_lna;
  144         int                             ext_5ghz_lna;
  145         int                             rssi_2ghz_corr;
  146         int                             rssi_5ghz_corr;
  147 
  148         int                             ncalls;
  149         int                             avg_rssi;
  150         int                             sifs;
  151 
  152         uint32_t                        erp_csr;
  153 
  154         uint8_t                         bbp18;
  155         uint8_t                         bbp21;
  156         uint8_t                         bbp22;
  157         uint8_t                         bbp16;
  158         uint8_t                         bbp17;
  159         uint8_t                         bbp64;
  160 
  161 #if NBPFILTER > 0
  162         void *                  sc_drvbpf;
  163 
  164         union {
  165                 struct rt2661_rx_radiotap_header th;
  166                 uint8_t pad[64];
  167         }                       sc_rxtapu;
  168 #define sc_rxtap                sc_rxtapu.th
  169         int                     sc_rxtap_len;
  170 
  171         union {
  172                 struct rt2661_tx_radiotap_header th;
  173                 uint8_t pad[64];
  174         }                       sc_txtapu;
  175 #define sc_txtap                sc_txtapu.th
  176         int                     sc_txtap_len;
  177 #endif
  178 };
  179 
  180 #define sc_if           sc_ec.ec_if
  181 
  182 int     rt2661_attach(void *, int);
  183 int     rt2661_detach(void *);
  184 int     rt2661_intr(void *);

Cache object: 3db0a661feb6fff49cc3b5b3b753fdca


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.