Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/rtwn/usb/rtwn_usb_var.h
Show All 15 Lines | |||||
* | * | ||||
* $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $ | * $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $ | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef RTWN_USBVAR_H | #ifndef RTWN_USBVAR_H | ||||
#define RTWN_USBVAR_H | #define RTWN_USBVAR_H | ||||
#include <dev/rtwn/if_rtwnreg.h> /* for struct rtwn_rx_stat_common */ | |||||
#define RTWN_USB_RXBUFSZ_UNIT (512) | |||||
#define RTWN_USB_RXBUFSZ_MIN ( 4) | |||||
#define RTWN_USB_RXBUFSZ_DEF (24) | |||||
#define RTWN_USB_RXBUFSZ_MAX (64) | |||||
#define RTWN_USB_TXBUFSZ (16 * 1024) | #define RTWN_USB_TXBUFSZ (16 * 1024) | ||||
#define RTWN_IFACE_INDEX 0 | #define RTWN_IFACE_INDEX 0 | ||||
#define RTWN_USB_RX_LIST_COUNT 1 | #define RTWN_USB_RX_LIST_COUNT 1 | ||||
#define RTWN_USB_TX_LIST_COUNT 16 | #define RTWN_USB_TX_LIST_COUNT 16 | ||||
struct rtwn_data { | struct rtwn_data { | ||||
Show All 21 Lines | |||||
struct rtwn_usb_softc { | struct rtwn_usb_softc { | ||||
struct rtwn_softc uc_sc; /* must be the first */ | struct rtwn_softc uc_sc; /* must be the first */ | ||||
struct usb_device *uc_udev; | struct usb_device *uc_udev; | ||||
struct usb_xfer *uc_xfer[RTWN_N_TRANSFER]; | struct usb_xfer *uc_xfer[RTWN_N_TRANSFER]; | ||||
struct rtwn_data uc_rx[RTWN_USB_RX_LIST_COUNT]; | struct rtwn_data uc_rx[RTWN_USB_RX_LIST_COUNT]; | ||||
rtwn_datahead uc_rx_active; | rtwn_datahead uc_rx_active; | ||||
rtwn_datahead uc_rx_inactive; | rtwn_datahead uc_rx_inactive; | ||||
int uc_rx_buf_size; | |||||
struct rtwn_rx_stat_common uc_rx_stat; | |||||
int uc_rx_stat_len; | |||||
int uc_rx_off; | |||||
struct rtwn_data uc_tx[RTWN_USB_TX_LIST_COUNT]; | struct rtwn_data uc_tx[RTWN_USB_TX_LIST_COUNT]; | ||||
rtwn_datahead uc_tx_active; | rtwn_datahead uc_tx_active; | ||||
rtwn_datahead uc_tx_inactive; | rtwn_datahead uc_tx_inactive; | ||||
rtwn_datahead uc_tx_pending; | rtwn_datahead uc_tx_pending; | ||||
int (*uc_align_rx)(int, int); | int (*uc_align_rx)(int, int); | ||||
int ntx; | int ntx; | ||||
int tx_agg_desc_num; | int tx_agg_desc_num; | ||||
}; | }; | ||||
#define RTWN_USB_SOFTC(sc) ((struct rtwn_usb_softc *)(sc)) | #define RTWN_USB_SOFTC(sc) ((struct rtwn_usb_softc *)(sc)) | ||||
#define rtwn_usb_align_rx(_uc, _totlen, _len) \ | #define rtwn_usb_align_rx(_uc, _totlen, _len) \ | ||||
(((_uc)->uc_align_rx)((_totlen), (_len))) | (((_uc)->uc_align_rx)((_totlen), (_len))) | ||||
#endif /* RTWN_USBVAR_H */ | #endif /* RTWN_USBVAR_H */ |