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/rt2560var.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: rt2560var.h,v 1.4 2006/09/25 22:14:01 jmcneill Exp $   */
    2 /*      $OpenBSD: rt2560var.h,v 1.2 2006/01/14 12:43:27 damien Exp $  */
    3 
    4 /*-
    5  * Copyright (c) 2005, 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 rt2560_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_antenna;
   29         uint8_t         wr_antsignal;
   30 } __packed;
   31 
   32 #define RT2560_RX_RADIOTAP_PRESENT                                      \
   33         ((1 << IEEE80211_RADIOTAP_TSFT) |                               \
   34          (1 << IEEE80211_RADIOTAP_FLAGS) |                              \
   35          (1 << IEEE80211_RADIOTAP_RATE) |                               \
   36          (1 << IEEE80211_RADIOTAP_CHANNEL) |                            \
   37          (1 << IEEE80211_RADIOTAP_ANTENNA) |                            \
   38          (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL))
   39 
   40 struct rt2560_tx_radiotap_header {
   41         struct ieee80211_radiotap_header wt_ihdr;
   42         uint8_t         wt_flags;
   43         uint8_t         wt_rate;
   44         uint16_t        wt_chan_freq;
   45         uint16_t        wt_chan_flags;
   46         uint8_t         wt_antenna;
   47 } __packed;
   48 
   49 #define RT2560_TX_RADIOTAP_PRESENT                                      \
   50         ((1 << IEEE80211_RADIOTAP_FLAGS) |                              \
   51          (1 << IEEE80211_RADIOTAP_RATE) |                               \
   52          (1 << IEEE80211_RADIOTAP_CHANNEL) |                            \
   53          (1 << IEEE80211_RADIOTAP_ANTENNA))
   54 
   55 struct rt2560_tx_data {
   56         bus_dmamap_t                    map;
   57         struct mbuf                     *m;
   58         struct ieee80211_node           *ni;
   59         struct ieee80211_rssdesc        id;
   60 };
   61 
   62 struct rt2560_tx_ring {
   63         bus_dmamap_t            map;
   64         bus_dma_segment_t       seg;
   65         bus_addr_t              physaddr;
   66         struct rt2560_tx_desc   *desc;
   67         struct rt2560_tx_data   *data;
   68         int                     count;
   69         int                     queued;
   70         int                     cur;
   71         int                     next;
   72         int                     cur_encrypt;
   73         int                     next_encrypt;
   74 };
   75 
   76 struct rt2560_rx_data {
   77         bus_dmamap_t    map;
   78         struct mbuf     *m;
   79         int             drop;
   80 };
   81 
   82 struct rt2560_rx_ring {
   83         bus_dmamap_t            map;
   84         bus_dma_segment_t       seg;
   85         bus_addr_t              physaddr;
   86         struct rt2560_rx_desc   *desc;
   87         struct rt2560_rx_data   *data;
   88         int                     count;
   89         int                     cur;
   90         int                     next;
   91         int                     cur_decrypt;
   92 };
   93 
   94 struct rt2560_node {
   95         struct ieee80211_node           ni;
   96         struct ieee80211_rssadapt       rssadapt;
   97 };
   98 
   99 struct rt2560_softc {
  100         struct device           sc_dev;
  101 
  102         struct ieee80211com     sc_ic;
  103         int                     (*sc_newstate)(struct ieee80211com *,
  104                                     enum ieee80211_state, int);
  105 
  106         int                     (*sc_enable)(struct rt2560_softc *);
  107         void                    (*sc_disable)(struct rt2560_softc *);
  108         void                    (*sc_power)(struct rt2560_softc *, int);
  109 
  110         bus_dma_tag_t           sc_dmat;
  111         bus_space_tag_t         sc_st;
  112         bus_space_handle_t      sc_sh;
  113 
  114         struct sysctllog        *sc_sysctllog;
  115 
  116         struct ethercom         sc_ec;
  117 
  118         struct callout          scan_ch;
  119         struct callout          rssadapt_ch;
  120 
  121         int                     sc_flags;
  122 #define RT2560_ENABLED  (1 << 0)
  123 
  124         int                     sc_tx_timer;
  125 
  126         uint32_t                asic_rev;
  127         uint8_t                 rf_rev;
  128 
  129         struct rt2560_tx_ring   txq;
  130         struct rt2560_tx_ring   prioq;
  131         struct rt2560_tx_ring   atimq;
  132         struct rt2560_tx_ring   bcnq;
  133         struct rt2560_rx_ring   rxq;
  134 
  135         struct ieee80211_beacon_offsets sc_bo;
  136 
  137         uint32_t                rf_regs[4];
  138         uint8_t                 txpow[14];
  139 
  140         struct {
  141                 uint8_t reg;
  142                 uint8_t val;
  143         }                       bbp_prom[16];
  144 
  145         int                     led_mode;
  146         int                     hw_radio;
  147         int                     rx_ant;
  148         int                     tx_ant;
  149         int                     nb_ant;
  150 
  151         int                     dwelltime;
  152 
  153 #if NBPFILTER > 0
  154         caddr_t                 sc_drvbpf;
  155 
  156         union {
  157                 struct rt2560_rx_radiotap_header th;
  158                 uint8_t pad[64];
  159         }                       sc_rxtapu;
  160 #define sc_rxtap                sc_rxtapu.th
  161         int                     sc_rxtap_len;
  162 
  163         union {
  164                 struct rt2560_tx_radiotap_header th;
  165                 uint8_t pad[64];
  166         }                       sc_txtapu;
  167 #define sc_txtap                sc_txtapu.th
  168         int                     sc_txtap_len;
  169 #endif
  170 
  171         void                    *sc_powerhook;
  172         int                     sc_suspend;
  173 };
  174 
  175 #define sc_if           sc_ec.ec_if
  176 
  177 int     rt2560_attach(void *, int);
  178 int     rt2560_detach(void *);
  179 int     rt2560_intr(void *);

Cache object: 741a177fbf8d7c5a73cd8a773008d9af


[ 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.