Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 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: device_cfg.h |
| 20 | * |
| 21 | * Purpose: Driver configuration header |
| 22 | * Author: Lyndon Chen |
| 23 | * |
| 24 | * Date: Dec 9, 2005 |
| 25 | * |
| 26 | */ |
| 27 | #ifndef __DEVICE_CONFIG_H |
| 28 | #define __DEVICE_CONFIG_H |
| 29 | |
Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 30 | #include <linux/types.h> |
| 31 | |
Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 32 | #include "ttype.h" |
Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 33 | |
| 34 | typedef |
| 35 | struct _version { |
Jim Lieb | 193a823 | 2009-08-12 14:54:06 -0700 | [diff] [blame] | 36 | unsigned char major; |
| 37 | unsigned char minor; |
| 38 | unsigned char build; |
Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 39 | } version_t, *pversion_t; |
| 40 | |
| 41 | #ifndef FALSE |
| 42 | #define FALSE (0) |
| 43 | #endif |
| 44 | |
| 45 | #ifndef TRUE |
| 46 | #define TRUE (!(FALSE)) |
| 47 | #endif |
| 48 | |
| 49 | #define VID_TABLE_SIZE 64 |
| 50 | #define MCAST_TABLE_SIZE 64 |
| 51 | #define MCAM_SIZE 32 |
| 52 | #define VCAM_SIZE 32 |
| 53 | #define TX_QUEUE_NO 8 |
| 54 | |
Forest Bond | f02a8cb | 2009-06-13 07:38:43 -0400 | [diff] [blame] | 55 | #define DEVICE_NAME "vt6656" |
Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 56 | #define DEVICE_FULL_DRV_NAM "VIA Networking Wireless LAN USB Driver" |
| 57 | |
| 58 | #ifndef MAJOR_VERSION |
| 59 | #define MAJOR_VERSION 1 |
| 60 | #endif |
| 61 | |
| 62 | #ifndef MINOR_VERSION |
| 63 | #define MINOR_VERSION 13 |
| 64 | #endif |
| 65 | |
| 66 | #ifndef DEVICE_VERSION |
| 67 | #define DEVICE_VERSION "1.19_12" |
| 68 | #endif |
| 69 | |
| 70 | //config file |
| 71 | #include <linux/fs.h> |
| 72 | #include <linux/fcntl.h> |
| 73 | #ifndef CONFIG_PATH |
| 74 | #define CONFIG_PATH "/etc/vntconfiguration.dat" |
| 75 | #endif |
| 76 | |
| 77 | //Max: 2378=2312Payload + 30HD +4CRC + 2Padding + 4Len + 8TSF + 4RSR |
| 78 | #define PKT_BUF_SZ 2390 |
| 79 | |
Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 80 | #define MAX_UINTS 8 |
| 81 | #define OPTION_DEFAULT { [0 ... MAX_UINTS-1] = -1} |
| 82 | |
Andres More | d9d1ccb | 2010-05-26 20:00:36 -0300 | [diff] [blame] | 83 | typedef enum _chip_type { |
| 84 | VT3184 = 1 |
Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 85 | } CHIP_TYPE, *PCHIP_TYPE; |
| 86 | |
Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 87 | #ifdef VIAWET_DEBUG |
| 88 | #define ASSERT(x) { \ |
| 89 | if (!(x)) { \ |
Andres More | d9d1ccb | 2010-05-26 20:00:36 -0300 | [diff] [blame] | 90 | printk(KERN_ERR "assertion %s failed: file %s line %d\n", #x, \ |
Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 91 | __FUNCTION__, __LINE__);\ |
Andres More | d9d1ccb | 2010-05-26 20:00:36 -0300 | [diff] [blame] | 92 | *(int *) 0 = 0; \ |
| 93 | } \ |
Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 94 | } |
| 95 | #define DBG_PORT80(value) outb(value, 0x80) |
| 96 | #else |
| 97 | #define ASSERT(x) |
| 98 | #define DBG_PORT80(value) |
| 99 | #endif |
| 100 | |
Forest Bond | 66252c3 | 2009-06-13 07:38:40 -0400 | [diff] [blame] | 101 | #endif |