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/rtwn/usb/rtwn_usb_var.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 /*-
    2  * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
    3  * Copyright (c) 2016 Andriy Voskoboinyk <avos@FreeBSD.org>
    4  *
    5  * Permission to use, copy, modify, and distribute this software for any
    6  * purpose with or without fee is hereby granted, provided that the above
    7  * copyright notice and this permission notice appear in all copies.
    8  *
    9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
   12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   16  *
   17  * $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $
   18  * $FreeBSD$
   19  */
   20 
   21 #ifndef RTWN_USBVAR_H
   22 #define RTWN_USBVAR_H
   23 
   24 #include <dev/rtwn/if_rtwnreg.h>        /* for struct rtwn_rx_stat_common */
   25 
   26 #define RTWN_USB_RXBUFSZ_UNIT           (512)
   27 #define RTWN_USB_RXBUFSZ_MIN            ( 4)
   28 #define RTWN_USB_RXBUFSZ_DEF            (24)
   29 #define RTWN_USB_RXBUFSZ_MAX            (64)
   30 #define RTWN_USB_TXBUFSZ                (16 * 1024)
   31 
   32 #define RTWN_IFACE_INDEX                0
   33 
   34 #define RTWN_USB_RX_LIST_COUNT          1
   35 #define RTWN_USB_TX_LIST_COUNT          16
   36 
   37 struct rtwn_data {
   38         uint8_t                         *buf;
   39         /* 'id' is meaningful for beacons only */
   40         int                             id;
   41         uint16_t                        buflen;
   42         struct mbuf                     *m;
   43         struct ieee80211_node           *ni;
   44         STAILQ_ENTRY(rtwn_data) next;
   45 };
   46 typedef STAILQ_HEAD(, rtwn_data) rtwn_datahead;
   47 
   48 enum {
   49         RTWN_BULK_RX,
   50         RTWN_BULK_TX_BE,        /* = WME_AC_BE */
   51         RTWN_BULK_TX_BK,        /* = WME_AC_BK */
   52         RTWN_BULK_TX_VI,        /* = WME_AC_VI */
   53         RTWN_BULK_TX_VO,        /* = WME_AC_VO */
   54         RTWN_N_TRANSFER = 5,
   55 };
   56 
   57 #define RTWN_EP_QUEUES          RTWN_BULK_RX
   58 
   59 struct rtwn_usb_softc {
   60         struct rtwn_softc       uc_sc;          /* must be the first */
   61         struct usb_device       *uc_udev;
   62         struct usb_xfer         *uc_xfer[RTWN_N_TRANSFER];
   63 
   64         struct rtwn_data        uc_rx[RTWN_USB_RX_LIST_COUNT];
   65         rtwn_datahead           uc_rx_active;
   66         rtwn_datahead           uc_rx_inactive;
   67         int                     uc_rx_buf_size;
   68 
   69         struct rtwn_rx_stat_common uc_rx_stat;
   70         int                     uc_rx_stat_len;
   71         int                     uc_rx_off;
   72 
   73         struct rtwn_data        uc_tx[RTWN_USB_TX_LIST_COUNT];
   74         rtwn_datahead           uc_tx_active;
   75         rtwn_datahead           uc_tx_inactive;
   76         rtwn_datahead           uc_tx_pending;
   77 
   78         int                     (*uc_align_rx)(int, int);
   79 
   80         int                     ntx;
   81         int                     tx_agg_desc_num;
   82 };
   83 #define RTWN_USB_SOFTC(sc)      ((struct rtwn_usb_softc *)(sc))
   84 
   85 #define rtwn_usb_align_rx(_uc, _totlen, _len) \
   86         (((_uc)->uc_align_rx)((_totlen), (_len)))
   87 
   88 #endif  /* RTWN_USBVAR_H */

Cache object: 4d6637eb059b75bf7481cb5f42841661


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