diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2010-08-20 19:15:30 +0400 |
---|---|---|
committer | Larry Finger <Larry.Finger@lwfinger.net> | 2010-08-20 19:15:30 +0400 |
commit | 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef (patch) | |
tree | 430b79f753b0e1cec6379b9a4208a716c914ac65 /drivers/staging/rtl8712/rtl871x_eeprom.h | |
parent | 763008c4357b73c8d18396dfd8d79dc58fa3f99d (diff) | |
download | linux-2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef.tar.xz |
staging: r8712u: Add the new driver to the mainline kernel
This code is for a completely new version of the Realtek 8192 USB devices
such as the D-Link DWA-130. The Realtek code, which was originally for
Linux, Windows XP and Windows CE, has been stripped of all code not needed
for Linux. In addition, only one additional configuration variable, which
enables AP mode, remains.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Tested-by: Frederic Leroy <fredo@starox.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_eeprom.h')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_eeprom.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_eeprom.h b/drivers/staging/rtl8712/rtl871x_eeprom.h new file mode 100644 index 000000000000..fb15f5bde426 --- /dev/null +++ b/drivers/staging/rtl8712/rtl871x_eeprom.h @@ -0,0 +1,82 @@ +#ifndef __RTL871X_EEPROM_H__ +#define __RTL871X_EEPROM_H__ + +#include "osdep_service.h" + +#define RTL8712_EEPROM_ID 0x8712 +#define EEPROM_MAX_SIZE 256 +#define CLOCK_RATE 50 /*100us*/ + +/*- EEPROM opcodes*/ +#define EEPROM_READ_OPCODE 06 +#define EEPROM_WRITE_OPCODE 05 +#define EEPROM_ERASE_OPCODE 07 +#define EEPROM_EWEN_OPCODE 19 /* Erase/write enable*/ +#define EEPROM_EWDS_OPCODE 16 /* Erase/write disable*/ + +#define EEPROM_CID_DEFAULT 0x0 +#define EEPROM_CID_ALPHA 0x1 +#define EEPROM_CID_Senao 0x3 +#define EEPROM_CID_NetCore 0x5 +#define EEPROM_CID_CAMEO 0X8 +#define EEPROM_CID_SITECOM 0x9 +#define EEPROM_CID_COREGA 0xB +#define EEPROM_CID_EDIMAX_BELKIN 0xC +#define EEPROM_CID_SERCOMM_BELKIN 0xE +#define EEPROM_CID_CAMEO1 0xF +#define EEPROM_CID_WNC_COREGA 0x12 +#define EEPROM_CID_CLEVO 0x13 +#define EEPROM_CID_WHQL 0xFE + +enum RT_CUSTOMER_ID { + RT_CID_DEFAULT = 0, + RT_CID_8187_ALPHA0 = 1, + RT_CID_8187_SERCOMM_PS = 2, + RT_CID_8187_HW_LED = 3, + RT_CID_8187_NETGEAR = 4, + RT_CID_WHQL = 5, + RT_CID_819x_CAMEO = 6, + RT_CID_819x_RUNTOP = 7, + RT_CID_819x_Senao = 8, + RT_CID_TOSHIBA = 9, + RT_CID_819x_Netcore = 10, + RT_CID_Nettronix = 11, + RT_CID_DLINK = 12, + RT_CID_PRONET = 13, + RT_CID_COREGA = 14, + RT_CID_819x_ALPHA = 15, + RT_CID_819x_Sitecom = 16, + RT_CID_CCX = 17, + RT_CID_819x_Lenovo = 18, + RT_CID_819x_QMI = 19, + RT_CID_819x_Edimax_Belkin = 20, + RT_CID_819x_Sercomm_Belkin = 21, + RT_CID_819x_CAMEO1 = 22, + RT_CID_819x_MSI = 23, + RT_CID_819x_Acer = 24, + RT_CID_819x_AzWave_ASUS = 25, + RT_CID_819x_AzWave = 26, + RT_CID_819x_WNC_COREGA = 27, + RT_CID_819x_CLEVO = 28, +}; + +struct eeprom_priv { + u8 bautoload_fail_flag; + u8 bempty; + u8 sys_config; + u8 mac_addr[6]; + u8 config0; + u16 channel_plan; + u8 country_string[3]; + u8 tx_power_b[15]; + u8 tx_power_g[15]; + u8 tx_power_a[201]; + u8 efuse_eeprom_data[EEPROM_MAX_SIZE]; + enum RT_CUSTOMER_ID CustomerID; +}; + +void r8712_eeprom_write16(struct _adapter *padapter, u16 reg, u16 data); +u16 r8712_eeprom_read16(struct _adapter *padapter, u16 reg); + +#endif /*__RTL871X_EEPROM_H__*/ + |