M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions

View File

@@ -0,0 +1,242 @@
//------------------------------------------------------------------------------
// ISC License (ISC)
//
// Copyright (c) 2005-2010, The Linux Foundation
// All rights reserved.
// Software was previously licensed under ISC license by Qualcomm Atheros, Inc.
//
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//
//
//------------------------------------------------------------------------------
//==============================================================================
// Author(s): ="Atheros"
//==============================================================================
#ifndef __REG_DBSCHEMA_H__
#define __REG_DBSCHEMA_H__
/*
* This file describes the regulatory DB schema, which is common between the
* 'generator' and 'parser'. The 'generator' runs on a host(typically a x86
* Linux) and spits outs two binary files, which follow the DB file
* format(described below). The resultant output "regulatoryData_AG.bin"
* is binary file which has information regarding A and G regulatory
* information, while the "regulatoryData_G.bin" consists of G-ONLY regulatory
* information. This binary file is parsed in the target for extracting
* regulatory information.
*
* The DB values used to populate the regulatory DB are defined in
* reg_dbvalues.h
*
*/
/* Binary data file - Representation of Regulatory DB*/
#define REG_DATA_FILE_AG "./regulatoryData_AG.bin"
#define REG_DATA_FILE_G "./regulatoryData_G.bin"
/* Table tags used to encode different tables in the database */
enum data_tags_t{
REG_DMN_PAIR_MAPPING_TAG = 0,
REG_COUNTRY_CODE_TO_ENUM_RD_TAG,
REG_DMN_FREQ_BAND_regDmn5GhzFreq_TAG,
REG_DMN_FREQ_BAND_regDmn2Ghz11_BG_Freq_TAG,
REG_DOMAIN_TAG,
MAX_DB_TABLE_TAGS
};
/*
****************************************************************************
* Regulatory DB file format :
* 4-bytes : "RGDB" (Magic Key)
* 4-bytes : version (Default is 5379(my extn))
* 4-bytes : length of file
* dbType(4)
* TAG(4)
* Entries(1)entrySize(1)searchType(1)reserved[3]tableSize(2)"0xdeadbeef"(4)struct_data....
* TAG(4)
* Entries(1)entrySize(1)searchType(1)reserved[3]tableSize(2)"0xdeadbeef"(4)struct_data....
* TAG(4)
* Entries(1)entrySize(1)searchType(1)reserved[3]tableSize(2)"0xdeadbeef"(4)struct_data....
* ...
* ...
****************************************************************************
*
*/
/*
* Length of the file would be filled in when the file is created and
* it would include the header size.
*/
#define REG_DB_KEY "RGDB" /* Should be EXACTLY 4-bytes */
#define REG_DB_VER 7803 /* Between 0-9999 */
/* REG_DB_VER history in reverse chronological order:
* 7803: 78 (ASCII code of N) + 03 (minor version number) - updated 08/03/10, p4#21
* 7802: 78 (ASCII code of N) + 02 (minor version number) - updated 10/21/09, p4#17
* 7801: 78 (ASCII code of N) + 01 (minor version number, increment on further changes)
* 1178: '11N' = 11 + ASCII code of N(78)
* 5379: initial version, no 11N support
*/
#define MAGIC_KEY_OFFSET 0
#define VERSION_OFFSET 4
#define FILE_SZ_OFFSET 8
#define DB_TYPE_OFFSET 12
#define MAGIC_KEY_SZ 4
#define VERSION_SZ 4
#define FILE_SZ_SZ 4
#define DB_TYPE_SZ 4
#define DB_TAG_SZ 4
#define REGDB_GET_MAGICKEY(x) ((char *)x + MAGIC_KEY_OFFSET)
#define REGDB_GET_VERSION(x) ((char *)x + VERSION_OFFSET)
#define REGDB_GET_FILESIZE(x) *((unsigned int *)((char *)x + FILE_SZ_OFFSET))
#define REGDB_GET_DBTYPE(x) *((char *)x + DB_TYPE_OFFSET)
#define REGDB_SET_FILESIZE(x, sz_) *((unsigned int *)((char *)x + FILE_SZ_OFFSET)) = (sz_)
#define REGDB_IS_EOF(cur, begin) ( REGDB_GET_FILESIZE(begin) > ((cur) - (begin)) )
/* A Table can be search based on key as a parameter or accessed directly
* by giving its index in to the table.
*/
enum searchType {
KEY_BASED_TABLE_SEARCH = 1,
INDEX_BASED_TABLE_ACCESS
};
/* Data is organised as different tables. There is a Master table, which
* holds information regarding all the tables. It does not have any
* knowledge about the attributes of the table it is holding
* but has external view of the same(for ex, how many entries, record size,
* how to search the table, total table size and reference to the data
* instance of table).
*/
typedef PREPACK struct dbMasterTable_t { /* Hold ptrs to Table data structures */
A_UCHAR numOfEntries;
A_CHAR entrySize; /* Entry size per table row */
A_CHAR searchType; /* Index based access or key based */
A_CHAR reserved[3]; /* for alignment */
A_UINT16 tableSize; /* Size of this table */
A_CHAR *dataPtr; /* Ptr to the actual Table */
} POSTPACK dbMasterTable; /* Master table - table of tables */
/* used to get the number of rows in a table */
#define REGDB_NUM_OF_ROWS(a) (sizeof (a) / sizeof (a[0]))
/*
* Used to set the RegDomain bitmask which chooses which frequency
* band specs are used.
*/
#define BMLEN 2 /* Use 2 32-bit uint for channel bitmask */
#define BMZERO {0,0} /* BMLEN zeros */
#define BM(_fa, _fb, _fc, _fd, _fe, _ff, _fg, _fh) \
{((((_fa >= 0) && (_fa < 32)) ? (((A_UINT32) 1) << _fa) : 0) | \
(((_fb >= 0) && (_fb < 32)) ? (((A_UINT32) 1) << _fb) : 0) | \
(((_fc >= 0) && (_fc < 32)) ? (((A_UINT32) 1) << _fc) : 0) | \
(((_fd >= 0) && (_fd < 32)) ? (((A_UINT32) 1) << _fd) : 0) | \
(((_fe >= 0) && (_fe < 32)) ? (((A_UINT32) 1) << _fe) : 0) | \
(((_ff >= 0) && (_ff < 32)) ? (((A_UINT32) 1) << _ff) : 0) | \
(((_fg >= 0) && (_fg < 32)) ? (((A_UINT32) 1) << _fg) : 0) | \
(((_fh >= 0) && (_fh < 32)) ? (((A_UINT32) 1) << _fh) : 0)), \
((((_fa > 31) && (_fa < 64)) ? (((A_UINT32) 1) << (_fa - 32)) : 0) | \
(((_fb > 31) && (_fb < 64)) ? (((A_UINT32) 1) << (_fb - 32)) : 0) | \
(((_fc > 31) && (_fc < 64)) ? (((A_UINT32) 1) << (_fc - 32)) : 0) | \
(((_fd > 31) && (_fd < 64)) ? (((A_UINT32) 1) << (_fd - 32)) : 0) | \
(((_fe > 31) && (_fe < 64)) ? (((A_UINT32) 1) << (_fe - 32)) : 0) | \
(((_ff > 31) && (_ff < 64)) ? (((A_UINT32) 1) << (_ff - 32)) : 0) | \
(((_fg > 31) && (_fg < 64)) ? (((A_UINT32) 1) << (_fg - 32)) : 0) | \
(((_fh > 31) && (_fh < 64)) ? (((A_UINT32) 1) << (_fh - 32)) : 0))}
/*
* THE following table is the mapping of regdomain pairs specified by
* a regdomain value to the individual unitary reg domains
*/
typedef PREPACK struct reg_dmn_pair_mapping {
A_UINT16 regDmnEnum; /* 16 bit reg domain pair */
A_UINT16 regDmn5GHz; /* 5GHz reg domain */
A_UINT16 regDmn2GHz; /* 2GHz reg domain */
A_UINT8 flags5GHz; /* Requirements flags (AdHoc disallow etc) */
A_UINT8 flags2GHz; /* Requirements flags (AdHoc disallow etc) */
A_UINT32 pscanMask; /* Passive Scan flags which can override unitary domain passive scan
flags. This value is used as a mask on the unitary flags*/
} POSTPACK REG_DMN_PAIR_MAPPING;
#define OFDM_YES (1 << 0)
#define OFDM_NO (0 << 0)
#define MCS_HT20_YES (1 << 1)
#define MCS_HT20_NO (0 << 1)
#define MCS_HT40_A_YES (1 << 2)
#define MCS_HT40_A_NO (0 << 2)
#define MCS_HT40_G_YES (1 << 3)
#define MCS_HT40_G_NO (0 << 3)
typedef PREPACK struct {
A_UINT16 countryCode;
A_UINT16 regDmnEnum;
A_CHAR isoName[3];
A_CHAR allowMode; /* what mode is allowed - bit 0: OFDM; bit 1: MCS_HT20; bit 2: MCS_HT40_A; bit 3: MCS_HT40_G */
} POSTPACK COUNTRY_CODE_TO_ENUM_RD;
/* lower 16 bits of ht40ChanMask */
#define NO_FREQ_HT40 0x0 /* no freq is HT40 capable */
#define F1_TO_F4_HT40 0xF /* freq 1 to 4 in the block is ht40 capable */
#define F2_TO_F3_HT40 0x6 /* freq 2 to 3 in the block is ht40 capable */
#define F1_TO_F10_HT40 0x3FF /* freq 1 to 10 in the block is ht40 capable */
#define F3_TO_F11_HT40 0x7FC /* freq 3 to 11 in the block is ht40 capable */
#define F3_TO_F9_HT40 0x1FC /* freq 3 to 9 in the block is ht40 capable */
#define F1_TO_F8_HT40 0xFF /* freq 1 to 8 in the block is ht40 capable */
#define F1_TO_F4_F9_TO_F10_HT40 0x30F /* freq 1 to 4, 9 to 10 in the block is ht40 capable */
/* upper 16 bits of ht40ChanMask */
#define FREQ_HALF_RATE 0x10000
#define FREQ_QUARTER_RATE 0x20000
typedef PREPACK struct RegDmnFreqBand {
A_UINT16 lowChannel; /* Low channel center in MHz */
A_UINT16 highChannel; /* High Channel center in MHz */
A_UINT8 power; /* Max power (dBm) for channel range */
A_UINT8 channelSep; /* Channel separation within the band */
A_UINT8 useDfs; /* Use DFS in the RegDomain if corresponding bit is set */
A_UINT8 mode; /* Mode of operation */
A_UINT32 usePassScan; /* Use Passive Scan in the RegDomain if corresponding bit is set */
A_UINT32 ht40ChanMask; /* lower 16 bits: indicate which frequencies in the block is HT40 capable
upper 16 bits: what rate (half/quarter) the channel is */
} POSTPACK REG_DMN_FREQ_BAND;
typedef PREPACK struct regDomain {
A_UINT16 regDmnEnum; /* value from EnumRd table */
A_UINT8 rdCTL;
A_UINT8 maxAntGain;
A_UINT8 dfsMask; /* DFS bitmask for 5Ghz tables */
A_UINT8 flags; /* Requirement flags (AdHoc disallow etc) */
A_UINT16 reserved; /* for alignment */
A_UINT32 pscan; /* Bitmask for passive scan */
A_UINT32 chan11a[BMLEN]; /* 64 bit bitmask for channel/band selection */
A_UINT32 chan11bg[BMLEN];/* 64 bit bitmask for channel/band selection */
} POSTPACK REG_DOMAIN;
#endif /* __REG_DBSCHEMA_H__ */

View File

@@ -0,0 +1,514 @@
//------------------------------------------------------------------------------
// ISC License (ISC)
//
// Copyright (c) 2005-2010, The Linux Foundation
// All rights reserved.
// Software was previously licensed under ISC license by Qualcomm Atheros, Inc.
//
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//
//
//------------------------------------------------------------------------------
//==============================================================================
// Author(s): ="Atheros"
//==============================================================================
#ifndef __REG_DBVALUE_H__
#define __REG_DBVALUE_H__
/*
* Numbering from ISO 3166
*/
enum CountryCode {
CTRY_ALBANIA = 8, /* Albania */
CTRY_ALGERIA = 12, /* Algeria */
CTRY_ARGENTINA = 32, /* Argentina */
CTRY_ARMENIA = 51, /* Armenia */
CTRY_ARUBA = 533, /* Aruba */
CTRY_AUSTRALIA = 36, /* Australia (for STA) */
CTRY_AUSTRALIA_AP = 5000, /* Australia (for AP) */
CTRY_AUSTRIA = 40, /* Austria */
CTRY_AZERBAIJAN = 31, /* Azerbaijan */
CTRY_BAHRAIN = 48, /* Bahrain */
CTRY_BANGLADESH = 50, /* Bangladesh */
CTRY_BARBADOS = 52, /* Barbados */
CTRY_BELARUS = 112, /* Belarus */
CTRY_BELGIUM = 56, /* Belgium */
CTRY_BELIZE = 84, /* Belize */
CTRY_BOLIVIA = 68, /* Bolivia */
CTRY_BOSNIA_HERZEGOWANIA = 70, /* Bosnia & Herzegowania */
CTRY_BRAZIL = 76, /* Brazil */
CTRY_BRUNEI_DARUSSALAM = 96, /* Brunei Darussalam */
CTRY_BULGARIA = 100, /* Bulgaria */
CTRY_CAMBODIA = 116, /* Cambodia */
CTRY_CANADA = 124, /* Canada (for STA) */
CTRY_CANADA_AP = 5001, /* Canada (for AP) */
CTRY_CHILE = 152, /* Chile */
CTRY_CHINA = 156, /* People's Republic of China */
CTRY_COLOMBIA = 170, /* Colombia */
CTRY_COSTA_RICA = 188, /* Costa Rica */
CTRY_CROATIA = 191, /* Croatia */
CTRY_CYPRUS = 196,
CTRY_CZECH = 203, /* Czech Republic */
CTRY_DENMARK = 208, /* Denmark */
CTRY_DOMINICAN_REPUBLIC = 214, /* Dominican Republic */
CTRY_ECUADOR = 218, /* Ecuador */
CTRY_EGYPT = 818, /* Egypt */
CTRY_EL_SALVADOR = 222, /* El Salvador */
CTRY_ESTONIA = 233, /* Estonia */
CTRY_FAEROE_ISLANDS = 234, /* Faeroe Islands */
CTRY_FINLAND = 246, /* Finland */
CTRY_FRANCE = 250, /* France */
CTRY_FRANCE2 = 255, /* France2 */
CTRY_GEORGIA = 268, /* Georgia */
CTRY_GERMANY = 276, /* Germany */
CTRY_GREECE = 300, /* Greece */
CTRY_GREENLAND = 304, /* Greenland */
CTRY_GRENADA = 308, /* Grenada */
CTRY_GUAM = 316, /* Guam */
CTRY_GUATEMALA = 320, /* Guatemala */
CTRY_HAITI = 332, /* Haiti */
CTRY_HONDURAS = 340, /* Honduras */
CTRY_HONG_KONG = 344, /* Hong Kong S.A.R., P.R.C. */
CTRY_HUNGARY = 348, /* Hungary */
CTRY_ICELAND = 352, /* Iceland */
CTRY_INDIA = 356, /* India */
CTRY_INDONESIA = 360, /* Indonesia */
CTRY_IRAN = 364, /* Iran */
CTRY_IRAQ = 368, /* Iraq */
CTRY_IRELAND = 372, /* Ireland */
CTRY_ISRAEL = 376, /* Israel */
CTRY_ITALY = 380, /* Italy */
CTRY_JAMAICA = 388, /* Jamaica */
CTRY_JAPAN = 392, /* Japan */
CTRY_JAPAN1 = 393, /* Japan (JP1) */
CTRY_JAPAN2 = 394, /* Japan (JP0) */
CTRY_JAPAN3 = 395, /* Japan (JP1-1) */
CTRY_JAPAN4 = 396, /* Japan (JE1) */
CTRY_JAPAN5 = 397, /* Japan (JE2) */
CTRY_JAPAN6 = 399, /* Japan (JP6) */
CTRY_JORDAN = 400, /* Jordan */
CTRY_KAZAKHSTAN = 398, /* Kazakhstan */
CTRY_KENYA = 404, /* Kenya */
CTRY_KOREA_NORTH = 408, /* North Korea */
CTRY_KOREA_ROC = 410, /* South Korea (for STA) */
CTRY_KOREA_ROC2 = 411, /* South Korea */
CTRY_KOREA_ROC3 = 412, /* South Korea (for AP) */
CTRY_KUWAIT = 414, /* Kuwait */
CTRY_LATVIA = 428, /* Latvia */
CTRY_LEBANON = 422, /* Lebanon */
CTRY_LIBYA = 434, /* Libya */
CTRY_LIECHTENSTEIN = 438, /* Liechtenstein */
CTRY_LITHUANIA = 440, /* Lithuania */
CTRY_LUXEMBOURG = 442, /* Luxembourg */
CTRY_MACAU = 446, /* Macau */
CTRY_MACEDONIA = 807, /* the Former Yugoslav Republic of Macedonia */
CTRY_MALAYSIA = 458, /* Malaysia */
CTRY_MALTA = 470, /* Malta */
CTRY_MEXICO = 484, /* Mexico */
CTRY_MONACO = 492, /* Principality of Monaco */
CTRY_MOROCCO = 504, /* Morocco */
CTRY_NEPAL = 524, /* Nepal */
CTRY_NETHERLANDS = 528, /* Netherlands */
CTRY_NETHERLAND_ANTILLES = 530, /* Netherlands-Antilles */
CTRY_NEW_ZEALAND = 554, /* New Zealand */
CTRY_NICARAGUA = 558, /* Nicaragua */
CTRY_NORWAY = 578, /* Norway */
CTRY_OMAN = 512, /* Oman */
CTRY_PAKISTAN = 586, /* Islamic Republic of Pakistan */
CTRY_PANAMA = 591, /* Panama */
CTRY_PARAGUAY = 600, /* Paraguay */
CTRY_PERU = 604, /* Peru */
CTRY_PHILIPPINES = 608, /* Republic of the Philippines */
CTRY_POLAND = 616, /* Poland */
CTRY_PORTUGAL = 620, /* Portugal */
CTRY_PUERTO_RICO = 630, /* Puerto Rico */
CTRY_QATAR = 634, /* Qatar */
CTRY_ROMANIA = 642, /* Romania */
CTRY_RUSSIA = 643, /* Russia */
CTRY_RWANDA = 646, /* Rwanda */
CTRY_SAUDI_ARABIA = 682, /* Saudi Arabia */
CTRY_MONTENEGRO = 891, /* Montenegro */
CTRY_SINGAPORE = 702, /* Singapore */
CTRY_SLOVAKIA = 703, /* Slovak Republic */
CTRY_SLOVENIA = 705, /* Slovenia */
CTRY_SOUTH_AFRICA = 710, /* South Africa */
CTRY_SPAIN = 724, /* Spain */
CTRY_SRILANKA = 144, /* Sri Lanka */
CTRY_SWEDEN = 752, /* Sweden */
CTRY_SWITZERLAND = 756, /* Switzerland */
CTRY_SYRIA = 760, /* Syria */
CTRY_TAIWAN = 158, /* Taiwan */
CTRY_THAILAND = 764, /* Thailand */
CTRY_TRINIDAD_Y_TOBAGO = 780, /* Trinidad y Tobago */
CTRY_TUNISIA = 788, /* Tunisia */
CTRY_TURKEY = 792, /* Turkey */
CTRY_UAE = 784, /* U.A.E. */
CTRY_UKRAINE = 804, /* Ukraine */
CTRY_UNITED_KINGDOM = 826, /* United Kingdom */
CTRY_UNITED_STATES = 840, /* United States (for STA) */
CTRY_UNITED_STATES_AP = 841, /* United States (for AP) */
CTRY_UNITED_STATES_PS = 842, /* United States - public safety */
CTRY_URUGUAY = 858, /* Uruguay */
CTRY_UZBEKISTAN = 860, /* Uzbekistan */
CTRY_VENEZUELA = 862, /* Venezuela */
CTRY_VIET_NAM = 704, /* Viet Nam */
CTRY_YEMEN = 887, /* Yemen */
CTRY_ZIMBABWE = 716 /* Zimbabwe */
};
#define CTRY_DEBUG 0
#define CTRY_DEFAULT 0x1ff
/*
* The following regulatory domain definitions are
* found in the EEPROM. Each regulatory domain
* can operate in either a 5GHz or 2.4GHz wireless mode or
* both 5GHz and 2.4GHz wireless modes.
* In general, the value holds no special
* meaning and is used to decode into either specific
* 2.4GHz or 5GHz wireless mode for that particular
* regulatory domain.
*
* Enumerated Regulatory Domain Information 8 bit values indicate that
* the regdomain is really a pair of unitary regdomains. 12 bit values
* are the real unitary regdomains and are the only ones which have the
* frequency bitmasks and flags set.
*/
enum EnumRd {
NO_ENUMRD = 0x00,
NULL1_WORLD = 0x03, /* For 11b-only countries (no 11a allowed) */
NULL1_ETSIB = 0x07, /* Israel */
NULL1_ETSIC = 0x08,
FCC1_FCCA = 0x10, /* USA */
FCC1_WORLD = 0x11, /* Hong Kong */
FCC2_FCCA = 0x20, /* Canada */
FCC2_WORLD = 0x21, /* Australia & HK */
FCC2_ETSIC = 0x22,
FCC3_FCCA = 0x3A, /* USA & Canada w/5470 band, 11h, DFS enabled */
FCC3_WORLD = 0x3B, /* USA & Canada w/5470 band, 11h, DFS enabled */
FCC4_FCCA = 0x12, /* FCC public safety plus UNII bands */
FCC5_FCCA = 0x13, /* US with no DFS */
FCC5_WORLD = 0x16, /* US with no DFS */
FCC6_FCCA = 0x14, /* Same as FCC2_FCCA but with 5600-5650MHz channels disabled for US & Canada APs */
FCC6_WORLD = 0x23, /* Same as FCC2_FCCA but with 5600-5650MHz channels disabled for Australia APs */
ETSI1_WORLD = 0x37,
ETSI2_WORLD = 0x35, /* Hungary & others */
ETSI3_WORLD = 0x36, /* France & others */
ETSI4_WORLD = 0x30,
ETSI4_ETSIC = 0x38,
ETSI5_WORLD = 0x39,
ETSI6_WORLD = 0x34, /* Bulgaria */
ETSI8_WORLD = 0x3D, /* Russia & Ukraine */
ETSI_RESERVED = 0x33, /* Reserved (Do not used) */
FRANCE_RES = 0x31, /* Legacy France for OEM */
APL6_WORLD = 0x5B, /* Singapore */
APL4_WORLD = 0x42, /* Singapore */
APL3_FCCA = 0x50,
APL_RESERVED = 0x44, /* Reserved (Do not used) */
APL2_WORLD = 0x45, /* Korea */
APL2_APLC = 0x46,
APL3_WORLD = 0x47,
APL2_APLD = 0x49, /* Korea with 2.3G channels */
APL2_FCCA = 0x4D, /* Specific Mobile Customer */
APL1_WORLD = 0x52, /* Latin America */
APL1_FCCA = 0x53,
APL1_ETSIC = 0x55,
APL2_ETSIC = 0x56, /* Venezuela */
APL5_WORLD = 0x58, /* Chile */
APL7_FCCA = 0x5C,
APL8_WORLD = 0x5D,
APL9_WORLD = 0x5E,
APL10_WORLD = 0x5F, /* Korea 5GHz for STA */
MKK5_MKKA = 0x99, /* This is a temporary value. MG and DQ have to give official one */
MKK5_FCCA = 0x9A, /* This is a temporary value. MG and DQ have to give official one */
MKK5_MKKC = 0x88,
MKK11_MKKA = 0xD4,
MKK11_FCCA = 0xD5,
MKK11_MKKC = 0xD7,
/*
* World mode SKUs
*/
WOR0_WORLD = 0x60, /* World0 (WO0 SKU) */
WOR1_WORLD = 0x61, /* World1 (WO1 SKU) */
WOR2_WORLD = 0x62, /* World2 (WO2 SKU) */
WOR3_WORLD = 0x63, /* World3 (WO3 SKU) */
WOR4_WORLD = 0x64, /* World4 (WO4 SKU) */
WOR5_ETSIC = 0x65, /* World5 (WO5 SKU) */
WOR01_WORLD = 0x66, /* World0-1 (WW0-1 SKU) */
WOR02_WORLD = 0x67, /* World0-2 (WW0-2 SKU) */
EU1_WORLD = 0x68, /* Same as World0-2 (WW0-2 SKU), except active scan ch1-13. No ch14 */
WOR9_WORLD = 0x69, /* World9 (WO9 SKU) */
WORA_WORLD = 0x6A, /* WorldA (WOA SKU) */
WORB_WORLD = 0x6B, /* WorldB (WOA SKU) */
WORC_WORLD = 0x6C, /* WorldC (WOA SKU) */
/*
* Regulator domains ending in a number (e.g. APL1,
* MK1, ETSI4, etc) apply to 5GHz channel and power
* information. Regulator domains ending in a letter
* (e.g. APLA, FCCA, etc) apply to 2.4GHz channel and
* power information.
*/
APL1 = 0x0150, /* LAT & Asia */
APL2 = 0x0250, /* LAT & Asia */
APL3 = 0x0350, /* Taiwan */
APL4 = 0x0450, /* Jordan */
APL5 = 0x0550, /* Chile */
APL6 = 0x0650, /* Singapore */
APL7 = 0x0750, /* Taiwan */
APL8 = 0x0850, /* Malaysia */
APL9 = 0x0950, /* Korea */
APL10 = 0x1050, /* Korea 5GHz */
ETSI1 = 0x0130, /* Europe & others */
ETSI2 = 0x0230, /* Europe & others */
ETSI3 = 0x0330, /* Europe & others */
ETSI4 = 0x0430, /* Europe & others */
ETSI5 = 0x0530, /* Europe & others */
ETSI6 = 0x0630, /* Europe & others */
ETSI8 = 0x0830, /* Russia & Ukraine - only by APs */
ETSIB = 0x0B30, /* Israel */
ETSIC = 0x0C30, /* Latin America */
FCC1 = 0x0110, /* US & others */
FCC2 = 0x0120, /* Canada, Australia & New Zealand */
FCC3 = 0x0160, /* US w/new middle band & DFS */
FCC4 = 0x0165,
FCC5 = 0x0180,
FCC6 = 0x0610,
FCCA = 0x0A10,
APLD = 0x0D50, /* South Korea */
MKK1 = 0x0140, /* Japan */
MKK2 = 0x0240, /* Japan Extended */
MKK3 = 0x0340, /* Japan new 5GHz */
MKK4 = 0x0440, /* Japan new 5GHz */
MKK5 = 0x0540, /* Japan new 5GHz */
MKK6 = 0x0640, /* Japan new 5GHz */
MKK7 = 0x0740, /* Japan new 5GHz */
MKK8 = 0x0840, /* Japan new 5GHz */
MKK9 = 0x0940, /* Japan new 5GHz */
MKK10 = 0x1040, /* Japan new 5GHz */
MKK11 = 0x1140, /* Japan new 5GHz */
MKK12 = 0x1240, /* Japan new 5GHz */
MKKA = 0x0A40, /* Japan */
MKKC = 0x0A50,
NULL1 = 0x0198,
WORLD = 0x0199,
DEBUG_REG_DMN = 0x01ff,
UNINIT_REG_DMN = 0x0fff,
};
enum { /* conformance test limits */
FCC = 0x10,
MKK = 0x40,
ETSI = 0x30,
NO_CTL = 0xff,
CTL_11B = 1,
CTL_11G = 2
};
/*
* The following are flags for different requirements per reg domain.
* These requirements are either inhereted from the reg domain pair or
* from the unitary reg domain if the reg domain pair flags value is
* 0
*/
enum {
NO_REQ = 0x00,
DISALLOW_ADHOC_11A = 0x01,
ADHOC_PER_11D = 0x02,
ADHOC_NO_11A = 0x04,
DISALLOW_ADHOC_11G = 0x08
};
/*
* The following describe the bit masks for different passive scan
* capability/requirements per regdomain.
*/
#define NO_PSCAN 0x00000000
#define PSCAN_FCC 0x00000001
#define PSCAN_ETSI 0x00000002
#define PSCAN_MKK 0x00000004
#define PSCAN_ETSIB 0x00000008
#define PSCAN_ETSIC 0x00000010
#define PSCAN_WWR 0x00000020
#define PSCAN_DEFER 0xFFFFFFFF
/* Bit masks for DFS per regdomain */
enum {
NO_DFS = 0x00,
DFS_FCC3 = 0x01,
DFS_ETSI = 0x02,
DFS_MKK = 0x04
};
#define DEF_REGDMN FCC1_FCCA
/*
* The following table is the master list for all different freqeuncy
* bands with the complete matrix of all possible flags and settings
* for each band if it is used in ANY reg domain.
*
* The table of frequency bands is indexed by a bitmask. The ordering
* must be consistent with the enum below. When adding a new
* frequency band, be sure to match the location in the enum with the
* comments
*/
/*
* These frequency values are as per channel tags and regulatory domain
* info. Please update them as database is updated.
*/
#define A_FREQ_MIN 4920
#define A_FREQ_MAX 5825
#define A_CHAN0_FREQ 5000
#define A_CHAN_MAX ((A_FREQ_MAX - A_CHAN0_FREQ)/5)
#define BG_FREQ_MIN 2412
#define BG_FREQ_MAX 2484
#define BG_CHAN0_FREQ 2407
#define BG_CHAN_MIN ((BG_FREQ_MIN - BG_CHAN0_FREQ)/5)
#define BG_CHAN_MAX 14 /* corresponding to 2484 MHz */
#define A_20MHZ_BAND_FREQ_MAX 5000
/*
* 5GHz 11A channel tags
*/
enum {
F1_4920_4980,
F1_5040_5080,
F1_5120_5240,
F1_5180_5240,
F2_5180_5240,
F3_5180_5240,
F4_5180_5240,
F5_5180_5240,
F6_5180_5240,
F7_5180_5240,
F1_5260_5280,
F1_5260_5320,
F2_5260_5320,
F3_5260_5320,
F4_5260_5320,
F5_5260_5320,
F6_5260_5320,
F1_5260_5700,
F1_5280_5320,
F1_5500_5620,
F1_5500_5660,
F1_5500_5700,
F2_5500_5700,
F3_5500_5700,
F4_5500_5700,
F5_5500_5700,
F6_5500_5700,
F7_5500_5700,
F8_5500_5700,
F1_5745_5805,
F2_5745_5805,
F3_5745_5805,
F1_5745_5825,
F2_5745_5825,
F3_5745_5825,
F4_5745_5825,
F5_5745_5825,
W1_4920_4980,
W1_5040_5080,
W1_5170_5230,
W1_5180_5240,
W1_5260_5320,
W1_5745_5825,
W1_5500_5700,
};
/* 2.4 GHz table - for 11b and 11g info */
enum {
BG1_2312_2372,
BG2_2312_2372,
BG1_2412_2472,
BG2_2412_2472,
BG3_2412_2472,
BG4_2412_2472,
BG1_2412_2462,
BG2_2412_2462,
BG1_2432_2442,
BG1_2457_2472,
BG1_2467_2472,
BG1_2484_2484, /* No G */
BG2_2484_2484, /* No G */
BG1_2512_2732,
WBG1_2312_2372,
WBG1_2412_2412,
WBG1_2417_2432,
WBG1_2437_2442,
WBG1_2447_2457,
WBG1_2462_2462,
WBG1_2467_2467,
WBG2_2467_2467,
WBG1_2472_2472,
WBG2_2472_2472,
WBG1_2484_2484, /* No G */
WBG2_2484_2484, /* No G */
};
#endif /* __REG_DBVALUE_H__ */