1
/******************************************************************************
2
* Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
4
* Based on the r8180 driver, which is:
5
* Copyright 2004-2005 Andrea Merello <andreamrl@tiscali.it>, et al.
6
* This program is free software; you can redistribute it and/or modify it
7
* under the terms of version 2 of the GNU General Public License as
8
* published by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15
* You should have received a copy of the GNU General Public License along with
16
* this program; if not, write to the Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19
* The full GNU General Public License is included in this distribution in the
20
* file called LICENSE.
22
* Contact Information:
23
* wlanfae <wlanfae@realtek.com>
24
******************************************************************************/
26
#ifndef __INC_HAL8192S_MP_H
27
#define __INC_HAL8192S_MP_H
29
/*--------------------------Define Parameters-------------------------------*/
32
#define MPT_READ_MAC_1BYTE 1
33
#define MPT_READ_MAC_2BYTE 2
34
#define MPT_READ_MAC_4BYTE 3
35
#define MPT_WRITE_MAC_1BYTE 4
36
#define MPT_WRITE_MAC_2BYTE 5
37
#define MPT_WRITE_MAC_4BYTE 6
38
#define MPT_READ_BB_CCK 7
39
#define MPT_WRITE_BB_CCK 8
40
#define MPT_READ_BB_OFDM 9
41
#define MPT_WRITE_BB_OFDM 10
42
#define MPT_READ_RF 11
43
#define MPT_WRITE_RF 12
44
#define MPT_READ_EEPROM_1BYTE 13
45
#define MPT_WRITE_EEPROM_1BYTE 14
46
#define MPT_READ_EEPROM_2BYTE 15
47
#define MPT_WRITE_EEPROM_2BYTE 16
48
#define MPT_SET_CSTHRESHOLD 21
49
#define MPT_SET_INITGAIN 22
50
#define MPT_SWITCH_BAND 23
51
#define MPT_SWITCH_CHANNEL 24
52
#define MPT_SET_DATARATE 25
53
#define MPT_SWITCH_ANTENNA 26
54
#define MPT_SET_TX_POWER 27
55
#define MPT_SET_CONT_TX 28
56
#define MPT_SET_SINGLE_CARRIER 29
57
#define MPT_SET_CARRIER_SUPPRESSION 30
59
#define MPT_SET_ANTENNA_GAIN_OFFSET 40
60
#define MPT_SET_CRYSTAL_CAP 41
61
#define MPT_TRIGGER_RF_THERMAL_METER 42
62
#define MPT_SET_SINGLE_TONE 43
63
#define MPT_READ_RF_THERMAL_METER 44
64
#define MPT_SWITCH_BAND_WIDTH 45
65
#define MPT_QUERY_TSSI_VALUE 46
66
#define MPT_SET_TX_POWER_ADJUST 47
67
#define MPT_DO_TX_POWER_TRACK 48
68
#define MPT_QUERY_NIC_TYPE 49
69
#define MPT_QUERY_WPS_PUSHED 50
70
#define MPT_SET_LED_CONTROL 51
71
#define MPT_TX_POWER_TRACK_CONTROL 52
73
#define MPT_WRITE_EFUSE_1BYTE 53
74
#define MPT_READ_EFUSE_1BYTE 54
75
#define MPT_READ_EFUSE_2BYTE 55
76
#define MPT_READ_EFUSE_4BYTE 56
77
#define MPT_UPDATE_EFUSE 57
78
#define MPT_UPDATE_EFUSE_UTILIZE 58
79
#define MPT_UPDATE_AUTOLOAD_STS 59
81
#define MAX_TX_PWR_INDEX_N_MODE 64
82
/*--------------------------Define Parameters-------------------------------*/
84
/*------------------------------Define structure----------------------------*/
85
/* MP set force data rate base on the definition. */
86
typedef enum _MPT_RATE_INDEX{
122
}MPT_RATE_E, *PMPT_RATE_E;
124
typedef enum _MPT_Bandwidth_Switch_Mode{
126
BAND_40MHZ_DUPLICATE_MODE = 1,
127
BAND_40MHZ_LOWER_MODE = 2,
128
BAND_40MHZ_UPPER_MODE = 3,
129
BAND_40MHZ_DONTCARE_MODE = 4
130
}MPT_BANDWIDTH_MODE_E, *PMPT_BANDWIDTH_MODE_E;
132
typedef enum _TxAGC_Offset{
133
TxAGC_Offset_0 = 0x00,
150
/*------------------------------Define structure----------------------------*/
151
void rtl8192_init_mp(struct net_device* dev);
152
int r8192_wx_mp_set_chan(struct net_device *dev, struct iw_request_info *info,
153
union iwreq_data *wrqu, char *extra);
154
int r8192_wx_mp_set_txrate(struct net_device *dev, struct iw_request_info *info,
155
union iwreq_data *wrqu, char *extra);
156
int r8192_wx_mp_set_txpower(struct net_device *dev, struct iw_request_info *info,
157
union iwreq_data *wrqu, char *extra);
158
int r8192_wx_mp_set_bw(struct net_device *dev,struct iw_request_info *info,
159
union iwreq_data *wrqu, char *extra);
160
int r8192_wx_mp_set_txstart(struct net_device *dev, struct iw_request_info *info,
161
union iwreq_data *wrqu, char *extra);
162
int r8192_wx_mp_set_singlecarrier(struct net_device *dev, struct iw_request_info *info,
163
union iwreq_data *wrqu, char *extra);
164
int r8192_wx_mp_write_rf(struct net_device *dev, struct iw_request_info *info,
165
union iwreq_data *wrqu, char *extra);
166
int r8192_wx_mp_write_mac(struct net_device *dev, struct iw_request_info *info,
167
union iwreq_data *wrqu, char *extra);
169
void mpt_StartCckContTx(struct net_device *dev,bool bScrambleOn);
170
void mpt_StartOfdmContTx(struct net_device *dev);
171
void mpt_StopCckCoNtTx(struct net_device *dev);
172
void mpt_StopOfdmContTx(struct net_device *dev);
173
void mpt_SwitchRfSetting92S(struct net_device *dev);
174
bool mpt_ProSetTxPower( struct net_device *dev, u32 ulTxPower);
175
bool mpt_ProSetTxAGCOffset(struct net_device *dev, u32 ulTxAGCOffset);
176
bool mpt_ProSetRxFilter(struct net_device *dev, u32 RCRMode);
177
bool mpt_ProSetRxFilter(struct net_device *dev, u32 RCRMode);
178
bool mpt_ProSetModulation(struct net_device *dev, u32 ulWirelessMode);
179
void mpt_Pro819xIoCallback(struct net_device *dev);
180
void MPT_ProSetSingleCarrier(struct net_device *dev, bool ulMode);
181
void MPT_ProSetBandWidth819x(struct net_device *dev);
182
void MPT_ProSwChannel(struct net_device *dev);
183
void MPT_ProSetDataRate819x(struct net_device *dev);
184
void MPT_ProSetTxAGCOffset(struct net_device *dev);