92 lines · c
1/* SPDX-License-Identifier: GPL-2.0+ */2/*3 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.4 * All rights reserved.5 *6 * Purpose:The header file of descriptor7 *8 * Revision History:9 *10 * Author: Tevin Chen11 *12 * Date: May 21, 199613 *14 */15 16#ifndef __DESC_H__17#define __DESC_H__18 19#include <linux/bits.h>20#include <linux/types.h>21#include <linux/mm.h>22 23/* max transmit or receive buffer size */24#define CB_MAX_BUF_SIZE 2900U /* NOTE: must be multiple of 4 */25 26#define MAX_TOTAL_SIZE_WITH_ALL_HEADERS CB_MAX_BUF_SIZE27 28#define MAX_INTERRUPT_SIZE 3229 30#define CB_MAX_RX_DESC 128 /* max # of descriptors */31#define CB_MIN_RX_DESC 16 /* min # of RX descriptors */32#define CB_MAX_TX_DESC 128 /* max # of descriptors */33#define CB_MIN_TX_DESC 16 /* min # of TX descriptors */34 35/*36 * bits in the RSR register37 */38#define RSR_ADDRBROAD BIT(7)39#define RSR_ADDRMULTI BIT(6)40#define RSR_ADDRUNI 0x0041#define RSR_IVLDTYP BIT(5) /* invalid packet type */42#define RSR_IVLDLEN BIT(4) /* invalid len (> 2312 byte) */43#define RSR_BSSIDOK BIT(3)44#define RSR_CRCOK BIT(2)45#define RSR_BCNSSIDOK BIT(1)46#define RSR_ADDROK BIT(0)47 48/*49 * bits in the new RSR register50 */51#define NEWRSR_DECRYPTOK BIT(4)52#define NEWRSR_CFPIND BIT(3)53#define NEWRSR_HWUTSF BIT(2)54#define NEWRSR_BCNHITAID BIT(1)55#define NEWRSR_BCNHITAID0 BIT(0)56 57/*58 * bits in the TSR register59 */60#define TSR_RETRYTMO BIT(3)61#define TSR_TMO BIT(2)62#define TSR_ACKDATA BIT(1)63#define TSR_VALID BIT(0)64 65#define FIFOCTL_AUTO_FB_1 0x100066#define FIFOCTL_AUTO_FB_0 0x080067#define FIFOCTL_GRPACK 0x040068#define FIFOCTL_11GA 0x030069#define FIFOCTL_11GB 0x020070#define FIFOCTL_11B 0x010071#define FIFOCTL_11A 0x000072#define FIFOCTL_RTS 0x008073#define FIFOCTL_ISDMA0 0x004074#define FIFOCTL_GENINT 0x002075#define FIFOCTL_TMOEN 0x001076#define FIFOCTL_LRETRY 0x000877#define FIFOCTL_CRCDIS 0x000478#define FIFOCTL_NEEDACK 0x000279#define FIFOCTL_LHEAD 0x000180 81/* WMAC definition Frag Control */82#define FRAGCTL_AES 0x030083#define FRAGCTL_TKIP 0x020084#define FRAGCTL_LEGACY 0x010085#define FRAGCTL_NONENCRYPT 0x000086#define FRAGCTL_ENDFRAG 0x000387#define FRAGCTL_MIDFRAG 0x000288#define FRAGCTL_STAFRAG 0x000189#define FRAGCTL_NONFRAG 0x000090 91#endif /* __DESC_H__ */92