1
2
3
4
5
6
7#ifndef __RTW_EEPROM_H__
8#define __RTW_EEPROM_H__
9
10
11#define RTL8712_EEPROM_ID 0x8712
12
13
14#define HWSET_MAX_SIZE_128 128
15#define HWSET_MAX_SIZE_256 256
16#define HWSET_MAX_SIZE_512 512
17
18#define EEPROM_MAX_SIZE HWSET_MAX_SIZE_512
19
20#define CLOCK_RATE 50
21
22
23#define EEPROM_READ_OPCODE 06
24#define EEPROM_WRITE_OPCODE 05
25#define EEPROM_ERASE_OPCODE 07
26#define EEPROM_EWEN_OPCODE 19
27#define EEPROM_EWDS_OPCODE 16
28
29
30#define USA 0x555320
31#define EUROPE 0x1
32#define JAPAN 0x2
33
34#define eeprom_cis0_sz 17
35#define eeprom_cis1_sz 50
36
37
38
39
40
41
42
43
44
45typedef enum _RT_CUSTOMER_ID
46{
47 RT_CID_DEFAULT = 0,
48 RT_CID_8187_ALPHA0 = 1,
49 RT_CID_8187_SERCOMM_PS = 2,
50 RT_CID_8187_HW_LED = 3,
51 RT_CID_8187_NETGEAR = 4,
52 RT_CID_WHQL = 5,
53 RT_CID_819x_CAMEO = 6,
54 RT_CID_819x_RUNTOP = 7,
55 RT_CID_819x_Senao = 8,
56 RT_CID_TOSHIBA = 9,
57 RT_CID_819x_Netcore = 10,
58 RT_CID_Nettronix = 11,
59 RT_CID_DLINK = 12,
60 RT_CID_PRONET = 13,
61 RT_CID_COREGA = 14,
62 RT_CID_CHINA_MOBILE = 15,
63 RT_CID_819x_ALPHA = 16,
64 RT_CID_819x_Sitecom = 17,
65 RT_CID_CCX = 18,
66 RT_CID_819x_Lenovo = 19,
67 RT_CID_819x_QMI = 20,
68 RT_CID_819x_Edimax_Belkin = 21,
69 RT_CID_819x_Sercomm_Belkin = 22,
70 RT_CID_819x_CAMEO1 = 23,
71 RT_CID_819x_MSI = 24,
72 RT_CID_819x_Acer = 25,
73 RT_CID_819x_AzWave_ASUS = 26,
74 RT_CID_819x_AzWave = 27,
75 RT_CID_819x_HP = 28,
76 RT_CID_819x_WNC_COREGA = 29,
77 RT_CID_819x_Arcadyan_Belkin = 30,
78 RT_CID_819x_SAMSUNG = 31,
79 RT_CID_819x_CLEVO = 32,
80 RT_CID_819x_DELL = 33,
81 RT_CID_819x_PRONETS = 34,
82 RT_CID_819x_Edimax_ASUS = 35,
83 RT_CID_NETGEAR = 36,
84 RT_CID_PLANEX = 37,
85 RT_CID_CC_C = 38,
86 RT_CID_819x_Xavi = 39,
87 RT_CID_LENOVO_CHINA = 40,
88 RT_CID_INTEL_CHINA = 41,
89 RT_CID_TPLINK_HPWR = 42,
90 RT_CID_819x_Sercomm_Netgear = 43,
91 RT_CID_819x_ALPHA_Dlink = 44,
92 RT_CID_WNC_NEC = 45,
93 RT_CID_DNI_BUFFALO = 46,
94}RT_CUSTOMER_ID, *PRT_CUSTOMER_ID;
95
96struct eeprom_priv
97{
98 u8 bautoload_fail_flag;
99 u8 bloadfile_fail_flag;
100 u8 bloadmac_fail_flag;
101 u8 EepromOrEfuse;
102
103 u8 mac_addr[6];
104
105 u16 channel_plan;
106 u16 CustomerID;
107
108 u8 efuse_eeprom_data[EEPROM_MAX_SIZE];
109 u8 adjuseVoltageVal;
110
111 u8 EEPROMRFGainOffset;
112 u8 EEPROMRFGainVal;
113
114 u8 sdio_setting;
115 u32 ocr;
116 u8 cis0[eeprom_cis0_sz];
117 u8 cis1[eeprom_cis1_sz];
118};
119
120#endif
121