1 /****************************************************************************** 2 * 3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of version 2 of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 * 14 ******************************************************************************/ 15 #ifndef __RTW_RF_H_ 16 #define __RTW_RF_H_ 17 18 #include <rtw_cmd.h> 19 20 #define OFDM_PHY 1 21 #define MIXED_PHY 2 22 #define CCK_PHY 3 23 24 #define NumRates (13) 25 26 /* slot time for 11g */ 27 #define SHORT_SLOT_TIME 9 28 #define NON_SHORT_SLOT_TIME 20 29 30 /* We now define the max channels in each channel plan. */ 31 #define MAX_CHANNEL_NUM_2G 14 32 #define MAX_CHANNEL_NUM_5G 24 33 #define MAX_CHANNEL_NUM 38/* 14+24 */ 34 35 /* define NUM_REGULATORYS 21 */ 36 #define NUM_REGULATORYS 1 37 38 /* Country codes */ 39 #define USA 0x555320 40 #define EUROPE 0x1 /* temp, should be provided later */ 41 #define JAPAN 0x2 /* temp, should be provided later */ 42 43 struct regulatory_class { 44 u32 starting_freq; /* MHz, */ 45 u8 channel_set[MAX_CHANNEL_NUM]; 46 u8 channel_cck_power[MAX_CHANNEL_NUM];/* dbm */ 47 u8 channel_ofdm_power[MAX_CHANNEL_NUM];/* dbm */ 48 u8 txpower_limit; /* dbm */ 49 u8 channel_spacing; /* MHz */ 50 u8 modem; 51 }; 52 53 enum { 54 cESS = 0x0001, 55 cIBSS = 0x0002, 56 cPollable = 0x0004, 57 cPollReq = 0x0008, 58 cPrivacy = 0x0010, 59 cShortPreamble = 0x0020, 60 cPBCC = 0x0040, 61 cChannelAgility = 0x0080, 62 cSpectrumMgnt = 0x0100, 63 cQos = 0x0200, /* For HCCA, use with CF-Pollable and CF-PollReq */ 64 cShortSlotTime = 0x0400, 65 cAPSD = 0x0800, 66 cRM = 0x1000, /* RRM (Radio Request Measurement) */ 67 cDSSS_OFDM = 0x2000, 68 cDelayedBA = 0x4000, 69 cImmediateBA = 0x8000, 70 }; 71 72 enum { 73 PREAMBLE_LONG = 1, 74 PREAMBLE_AUTO = 2, 75 PREAMBLE_SHORT = 3, 76 }; 77 78 /* Bandwidth Offset */ 79 #define HAL_PRIME_CHNL_OFFSET_DONT_CARE 0 80 #define HAL_PRIME_CHNL_OFFSET_LOWER 1 81 #define HAL_PRIME_CHNL_OFFSET_UPPER 2 82 83 /* Represent Channel Width in HT Capabilities */ 84 enum ht_channel_width { 85 HT_CHANNEL_WIDTH_20 = 0, 86 HT_CHANNEL_WIDTH_40 = 1, 87 HT_CHANNEL_WIDTH_80 = 2, 88 HT_CHANNEL_WIDTH_160 = 3, 89 HT_CHANNEL_WIDTH_10 = 4, 90 }; 91 92 /* 2007/11/15 MH Define different RF type. */ 93 enum { 94 RF_1T2R = 0, 95 RF_2T4R = 1, 96 RF_2T2R = 2, 97 RF_1T1R = 3, 98 RF_2T2R_GREEN = 4, 99 RF_819X_MAX_TYPE = 5, 100 }; 101 102 #endif /* _RTL8711_RF_H_ */ 103