2013-05-08 21:45:39 +00:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
2014-12-19 06:59:46 +00:00
|
|
|
*
|
2013-05-08 21:45:39 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of version 2 of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
|
|
*
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
2014-12-19 06:59:46 +00:00
|
|
|
#ifndef __RTW_RF_H_
|
2013-05-08 21:45:39 +00:00
|
|
|
#define __RTW_RF_H_
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
#include <drv_conf.h>
|
2013-05-08 21:45:39 +00:00
|
|
|
#include <rtw_cmd.h>
|
|
|
|
|
|
|
|
#define OFDM_PHY 1
|
|
|
|
#define MIXED_PHY 2
|
|
|
|
#define CCK_PHY 3
|
|
|
|
|
|
|
|
#define NumRates (13)
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
// slot time for 11g
|
|
|
|
#define SHORT_SLOT_TIME 9
|
|
|
|
#define NON_SHORT_SLOT_TIME 20
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
#define RTL8711_RF_MAX_SENS 6
|
|
|
|
#define RTL8711_RF_DEF_SENS 4
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
//
|
|
|
|
// We now define the following channels as the max channels in each channel plan.
|
|
|
|
// 2G, total 14 chnls
|
|
|
|
// {1,2,3,4,5,6,7,8,9,10,11,12,13,14}
|
|
|
|
// 5G, total 24 chnls
|
|
|
|
// {36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165}
|
|
|
|
#define MAX_CHANNEL_NUM_2G 14
|
|
|
|
#define MAX_CHANNEL_NUM_5G 24
|
|
|
|
#define MAX_CHANNEL_NUM 38//14+24
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
//#define NUM_REGULATORYS 21
|
2013-05-08 21:45:39 +00:00
|
|
|
#define NUM_REGULATORYS 1
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
//Country codes
|
|
|
|
#define USA 0x555320
|
2014-12-19 06:59:46 +00:00
|
|
|
#define EUROPE 0x1 //temp, should be provided later
|
|
|
|
#define JAPAN 0x2 //temp, should be provided later
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
struct regulatory_class {
|
2014-12-19 06:59:46 +00:00
|
|
|
u32 starting_freq; //MHz,
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 channel_set[MAX_CHANNEL_NUM];
|
2014-12-11 21:15:04 +00:00
|
|
|
u8 channel_cck_power[MAX_CHANNEL_NUM];//dbm
|
|
|
|
u8 channel_ofdm_power[MAX_CHANNEL_NUM];//dbm
|
2014-12-19 06:59:46 +00:00
|
|
|
u8 txpower_limit; //dbm
|
2014-12-11 21:15:04 +00:00
|
|
|
u8 channel_spacing; //MHz
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 modem;
|
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
typedef enum _CAPABILITY{
|
|
|
|
cESS = 0x0001,
|
|
|
|
cIBSS = 0x0002,
|
|
|
|
cPollable = 0x0004,
|
|
|
|
cPollReq = 0x0008,
|
|
|
|
cPrivacy = 0x0010,
|
2013-05-08 21:45:39 +00:00
|
|
|
cShortPreamble = 0x0020,
|
2014-12-11 21:15:04 +00:00
|
|
|
cPBCC = 0x0040,
|
2013-05-08 21:45:39 +00:00
|
|
|
cChannelAgility = 0x0080,
|
|
|
|
cSpectrumMgnt = 0x0100,
|
2014-12-11 21:15:04 +00:00
|
|
|
cQos = 0x0200, // For HCCA, use with CF-Pollable and CF-PollReq
|
2013-05-08 21:45:39 +00:00
|
|
|
cShortSlotTime = 0x0400,
|
2014-12-11 21:15:04 +00:00
|
|
|
cAPSD = 0x0800,
|
|
|
|
cRM = 0x1000, // RRM (Radio Request Measurement)
|
2013-05-08 21:45:39 +00:00
|
|
|
cDSSS_OFDM = 0x2000,
|
2014-12-11 21:15:04 +00:00
|
|
|
cDelayedBA = 0x4000,
|
2013-05-08 21:45:39 +00:00
|
|
|
cImmediateBA = 0x8000,
|
2014-12-11 21:15:04 +00:00
|
|
|
}CAPABILITY, *PCAPABILITY;
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
enum _REG_PREAMBLE_MODE{
|
2013-05-08 21:45:39 +00:00
|
|
|
PREAMBLE_LONG = 1,
|
|
|
|
PREAMBLE_AUTO = 2,
|
|
|
|
PREAMBLE_SHORT = 3,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
enum _RTL8712_RF_MIMO_CONFIG_{
|
|
|
|
RTL8712_RFCONFIG_1T=0x10,
|
|
|
|
RTL8712_RFCONFIG_2T=0x20,
|
|
|
|
RTL8712_RFCONFIG_1R=0x01,
|
|
|
|
RTL8712_RFCONFIG_2R=0x02,
|
|
|
|
RTL8712_RFCONFIG_1T1R=0x11,
|
|
|
|
RTL8712_RFCONFIG_1T2R=0x12,
|
|
|
|
RTL8712_RFCONFIG_TURBO=0x92,
|
|
|
|
RTL8712_RFCONFIG_2T2R=0x22
|
2013-07-26 21:27:19 +00:00
|
|
|
};
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
typedef enum _RF90_RADIO_PATH{
|
|
|
|
RF90_PATH_A = 0, //Radio Path A
|
|
|
|
RF90_PATH_B = 1, //Radio Path B
|
|
|
|
RF90_PATH_C = 2, //Radio Path C
|
2014-12-19 06:59:46 +00:00
|
|
|
RF90_PATH_D = 3 //Radio Path D
|
|
|
|
//RF90_PATH_MAX //Max RF number 90 support
|
2014-12-11 21:15:04 +00:00
|
|
|
}RF90_RADIO_PATH_E, *PRF90_RADIO_PATH_E;
|
|
|
|
|
|
|
|
// Bandwidth Offset
|
2013-05-08 21:45:39 +00:00
|
|
|
#define HAL_PRIME_CHNL_OFFSET_DONT_CARE 0
|
|
|
|
#define HAL_PRIME_CHNL_OFFSET_LOWER 1
|
|
|
|
#define HAL_PRIME_CHNL_OFFSET_UPPER 2
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
// Represent Channel Width in HT Capabilities
|
|
|
|
//
|
2014-12-19 06:59:46 +00:00
|
|
|
typedef enum _HT_CHANNEL_WIDTH {
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
HT_CHANNEL_WIDTH_20 = 0,
|
|
|
|
HT_CHANNEL_WIDTH_40 = 1,
|
|
|
|
HT_CHANNEL_WIDTH_80 = 2,
|
|
|
|
HT_CHANNEL_WIDTH_160 = 3,
|
|
|
|
HT_CHANNEL_WIDTH_10 = 4,
|
2014-12-19 06:59:46 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
}HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Represent Extention Channel Offset in HT Capabilities
|
|
|
|
// This is available only in 40Mhz mode.
|
|
|
|
//
|
|
|
|
typedef enum _HT_EXTCHNL_OFFSET{
|
2013-05-08 21:45:39 +00:00
|
|
|
HT_EXTCHNL_OFFSET_NO_EXT = 0,
|
|
|
|
HT_EXTCHNL_OFFSET_UPPER = 1,
|
|
|
|
HT_EXTCHNL_OFFSET_NO_DEF = 2,
|
|
|
|
HT_EXTCHNL_OFFSET_LOWER = 3,
|
2014-12-11 21:15:04 +00:00
|
|
|
}HT_EXTCHNL_OFFSET, *PHT_EXTCHNL_OFFSET;
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
/* 2007/11/15 MH Define different RF type. */
|
2014-12-11 21:15:04 +00:00
|
|
|
typedef enum _RT_RF_TYPE_DEFINITION
|
|
|
|
{
|
2013-05-08 21:45:39 +00:00
|
|
|
RF_1T2R = 0,
|
|
|
|
RF_2T4R = 1,
|
|
|
|
RF_2T2R = 2,
|
|
|
|
RF_1T1R = 3,
|
|
|
|
RF_2T2R_GREEN = 4,
|
|
|
|
RF_819X_MAX_TYPE = 5,
|
2014-12-11 21:15:04 +00:00
|
|
|
}RT_RF_TYPE_DEF_E;
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
u32 rtw_ch2freq(u32 ch);
|
|
|
|
u32 rtw_freq2ch(u32 freq);
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
#endif //_RTL8711_RF_H_
|