1/* 2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. 3 * All rights reserved. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along 16 * with this program; if not, write to the Free Software Foundation, Inc., 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * File: desc.h 20 * 21 * Purpose:The header file of descriptor 22 * 23 * Revision History: 24 * 25 * Author: Tevin Chen 26 * 27 * Date: May 21, 1996 28 * 29 */ 30 31#ifndef __DESC_H__ 32#define __DESC_H__ 33 34#include <linux/types.h> 35#include <linux/mm.h> 36 37/* max transmit or receive buffer size */ 38#define CB_MAX_BUF_SIZE 2900U /* NOTE: must be multiple of 4 */ 39 40#define MAX_TOTAL_SIZE_WITH_ALL_HEADERS CB_MAX_BUF_SIZE 41 42#define MAX_INTERRUPT_SIZE 32 43 44#define CB_MAX_RX_DESC 128 /* max # of descriptors */ 45#define CB_MIN_RX_DESC 16 /* min # of RX descriptors */ 46#define CB_MAX_TX_DESC 128 /* max # of descriptors */ 47#define CB_MIN_TX_DESC 16 /* min # of TX descriptors */ 48 49/* 50 * bits in the RSR register 51 */ 52#define RSR_ADDRBROAD 0x80 53#define RSR_ADDRMULTI 0x40 54#define RSR_ADDRUNI 0x00 55#define RSR_IVLDTYP 0x20 /* invalid packet type */ 56#define RSR_IVLDLEN 0x10 /* invalid len (> 2312 byte) */ 57#define RSR_BSSIDOK 0x08 58#define RSR_CRCOK 0x04 59#define RSR_BCNSSIDOK 0x02 60#define RSR_ADDROK 0x01 61 62/* 63 * bits in the new RSR register 64 */ 65#define NEWRSR_DECRYPTOK 0x10 66#define NEWRSR_CFPIND 0x08 67#define NEWRSR_HWUTSF 0x04 68#define NEWRSR_BCNHITAID 0x02 69#define NEWRSR_BCNHITAID0 0x01 70 71/* 72 * bits in the TSR register 73 */ 74#define TSR_RETRYTMO 0x08 75#define TSR_TMO 0x04 76#define TSR_ACKDATA 0x02 77#define TSR_VALID 0x01 78 79#define FIFOCTL_AUTO_FB_1 0x1000 80#define FIFOCTL_AUTO_FB_0 0x0800 81#define FIFOCTL_GRPACK 0x0400 82#define FIFOCTL_11GA 0x0300 83#define FIFOCTL_11GB 0x0200 84#define FIFOCTL_11B 0x0100 85#define FIFOCTL_11A 0x0000 86#define FIFOCTL_RTS 0x0080 87#define FIFOCTL_ISDMA0 0x0040 88#define FIFOCTL_GENINT 0x0020 89#define FIFOCTL_TMOEN 0x0010 90#define FIFOCTL_LRETRY 0x0008 91#define FIFOCTL_CRCDIS 0x0004 92#define FIFOCTL_NEEDACK 0x0002 93#define FIFOCTL_LHEAD 0x0001 94 95/* WMAC definition Frag Control */ 96#define FRAGCTL_AES 0x0300 97#define FRAGCTL_TKIP 0x0200 98#define FRAGCTL_LEGACY 0x0100 99#define FRAGCTL_NONENCRYPT 0x0000 100#define FRAGCTL_ENDFRAG 0x0003 101#define FRAGCTL_MIDFRAG 0x0002 102#define FRAGCTL_STAFRAG 0x0001 103#define FRAGCTL_NONFRAG 0x0000 104 105#endif /* __DESC_H__ */ 106