drivers/char/mem.c: avoid OOM lockup during large reads from /dev/zero
[safe/jmp/linux-2.6] / drivers / staging / rtl8187se / r8180_93cx6.h
1 /*
2         This is part of rtl8180 OpenSource driver
3         Copyright (C) Andrea Merello 2004-2005  <andreamrl@tiscali.it>
4         Released under the terms of GPL (General Public Licence)
5
6         Parts of this driver are based on the GPL part of the official realtek driver
7         Parts of this driver are based on the rtl8180 driver skeleton from Patric Schenke & Andres Salomon
8         Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver
9
10         We want to tanks the Authors of such projects and the Ndiswrapper project Authors.
11 */
12
13 /*This files contains card eeprom (93c46 or 93c56) programming routines*/
14 /*memory is addressed by WORDS*/
15
16 #include "r8180.h"
17 #include "r8180_hw.h"
18
19 #define EPROM_DELAY 10
20
21 #define EPROM_ANAPARAM_ADDRLWORD 0xd
22 #define EPROM_ANAPARAM_ADDRHWORD 0xe
23
24 #define RFCHIPID 0x6
25 #define RFCHIPID_INTERSIL 1
26 #define RFCHIPID_RFMD 2
27 #define RFCHIPID_PHILIPS 3
28 #define RFCHIPID_MAXIM 4
29 #define RFCHIPID_GCT 5
30 #define RFCHIPID_RTL8225 9
31 #ifdef CONFIG_RTL8185B
32 #define RF_ZEBRA2 11
33 #define EPROM_TXPW_BASE 0x05
34 #define RF_ZEBRA4 12
35 #endif
36 #define RFCHIPID_RTL8255 0xa
37 #define RF_PARAM 0x19
38 #define RF_PARAM_DIGPHY_SHIFT 0
39 #define RF_PARAM_ANTBDEFAULT_SHIFT 1
40 #define RF_PARAM_CARRIERSENSE_SHIFT 2
41 #define RF_PARAM_CARRIERSENSE_MASK (3<<2)
42 #define ENERGY_TRESHOLD 0x17
43 #define EPROM_VERSION 0x1E
44 #define MAC_ADR 0x7
45
46 #define CIS 0x18
47
48 #define EPROM_TXPW_OFDM_CH1_2 0x20
49
50 //#define       EPROM_TXPW_CH1_2 0x10
51 #define  EPROM_TXPW_CH1_2 0x30
52 #define EPROM_TXPW_CH3_4 0x11
53 #define EPROM_TXPW_CH5_6 0x12
54 #define EPROM_TXPW_CH7_8 0x13
55 #define EPROM_TXPW_CH9_10 0x14
56 #define EPROM_TXPW_CH11_12 0x15
57 #define EPROM_TXPW_CH13_14 0x16
58
59 u32 eprom_read(struct net_device *dev,u32 addr); //reads a 16 bits word