Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Ashish Kumar Dhanotiya | aa9fdbb | 2018-12-14 15:29:14 +0530 | [diff] [blame^] | 2 | * Copyright (c) 2011, 2014-2019 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
| 19 | /* |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 20 | * Notifications and licenses are retained for attribution purposes only. |
| 21 | */ |
| 22 | /* |
| 23 | * Copyright (c) 2002-2006 Sam Leffler, Errno Consulting |
| 24 | * Copyright (c) 2005-2006 Atheros Communications, Inc. |
| 25 | * Copyright (c) 2010, Atheros Communications Inc. |
| 26 | * |
| 27 | * Redistribution and use in source and binary forms are permitted |
| 28 | * provided that the following conditions are met: |
| 29 | * 1. The materials contained herein are unmodified and are used |
| 30 | * unmodified. |
| 31 | * 2. Redistributions of source code must retain the above copyright |
| 32 | * notice, this list of conditions and the following NO |
| 33 | * ''WARRANTY'' disclaimer below (''Disclaimer''), without |
| 34 | * modification. |
| 35 | * 3. Redistributions in binary form must reproduce at minimum a |
| 36 | * disclaimer similar to the Disclaimer below and any redistribution |
| 37 | * must be conditioned upon including a substantially similar |
| 38 | * Disclaimer requirement for further binary redistribution. |
| 39 | * 4. Neither the names of the above-listed copyright holders nor the |
| 40 | * names of any contributors may be used to endorse or promote |
| 41 | * product derived from this software without specific prior written |
| 42 | * permission. |
| 43 | * |
| 44 | * NO WARRANTY |
| 45 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 46 | * ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 47 | * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, |
| 48 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 49 | * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE |
| 50 | * FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 51 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
| 52 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 53 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 54 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
| 55 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 56 | * SUCH DAMAGES. |
| 57 | * |
| 58 | * This module contains the regulatory domain private structure definitions . |
| 59 | * |
| 60 | */ |
| 61 | |
Amar Singhal | 2299511 | 2016-01-22 10:42:33 -0800 | [diff] [blame] | 62 | #ifndef __CDS_REGDOMAIN_H |
| 63 | #define __CDS_REGDOMAIN_H |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 64 | |
Ashish Kumar Dhanotiya | aa9fdbb | 2018-12-14 15:29:14 +0530 | [diff] [blame^] | 65 | #include <wlan_cmn.h> |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 66 | #include <reg_services_public_struct.h> |
| 67 | |
Rajeev Kumar | 43e25b1 | 2016-04-15 16:26:36 -0700 | [diff] [blame] | 68 | #define MIN_TX_PWR_CAP 8 |
Bala Venkatesh | cd9decb | 2018-12-12 17:12:35 +0530 | [diff] [blame] | 69 | #define MAX_TX_PWR_CAP 30 |
Naveen Rawat | 3b6068c | 2016-04-14 19:01:06 -0700 | [diff] [blame] | 70 | |
Amar Singhal | 5f99786 | 2016-08-24 13:17:50 -0700 | [diff] [blame] | 71 | #define CTRY_DEFAULT 0 |
| 72 | #define CTRY_FLAG 0x8000 |
| 73 | #define WORLD_ROAMING_FLAG 0x4000 |
| 74 | #define WORLD_ROAMING_MASK 0x00F0 |
| 75 | #define WORLD_ROAMING_PREFIX 0x0060 |
| 76 | |
Amar Singhal | 2299511 | 2016-01-22 10:42:33 -0800 | [diff] [blame] | 77 | enum country_code { |
Amar Singhal | 76b4132 | 2015-12-09 14:39:17 -0800 | [diff] [blame] | 78 | CTRY_AFGHANISTAN = 4, |
| 79 | CTRY_ALBANIA = 8, |
| 80 | CTRY_ALGERIA = 12, |
| 81 | CTRY_AMERICAN_SAMOA = 16, |
| 82 | CTRY_ANGUILLA = 660, |
| 83 | CTRY_ARGENTINA = 32, |
| 84 | CTRY_ARGENTINA_AP = 5003, |
| 85 | CTRY_ARMENIA = 51, |
| 86 | CTRY_ARUBA = 533, |
| 87 | CTRY_AUSTRALIA = 36, |
| 88 | CTRY_AUSTRALIA_AP = 5000, |
| 89 | CTRY_AUSTRIA = 40, |
| 90 | CTRY_AZERBAIJAN = 31, |
| 91 | CTRY_BAHAMAS = 44, |
| 92 | CTRY_BAHRAIN = 48, |
| 93 | CTRY_BANGLADESH = 50, |
| 94 | CTRY_BARBADOS = 52, |
| 95 | CTRY_BELARUS = 112, |
| 96 | CTRY_BELGIUM = 56, |
| 97 | CTRY_BELIZE = 84, |
| 98 | CTRY_BERMUDA = 60, |
| 99 | CTRY_BHUTAN = 64, |
| 100 | CTRY_BOLIVIA = 68, |
| 101 | CTRY_BOSNIA_HERZ = 70, |
| 102 | CTRY_BRAZIL = 76, |
| 103 | CTRY_BRUNEI_DARUSSALAM = 96, |
| 104 | CTRY_BULGARIA = 100, |
| 105 | CTRY_BURKINA_FASO = 854, |
| 106 | CTRY_CAMBODIA = 116, |
| 107 | CTRY_CANADA = 124, |
| 108 | CTRY_CANADA_AP = 5001, |
| 109 | CTRY_CAYMAN_ISLANDS = 136, |
| 110 | CTRY_CENTRAL_AFRICA_REPUBLIC = 140, |
| 111 | CTRY_CHAD = 148, |
| 112 | CTRY_CHILE = 152, |
| 113 | CTRY_CHINA = 156, |
| 114 | CTRY_CHRISTMAS_ISLAND = 162, |
| 115 | CTRY_COLOMBIA = 170, |
| 116 | CTRY_COSTA_RICA = 188, |
| 117 | CTRY_COTE_DIVOIRE = 384, |
| 118 | CTRY_CROATIA = 191, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 119 | CTRY_CYPRUS = 196, |
Amar Singhal | 76b4132 | 2015-12-09 14:39:17 -0800 | [diff] [blame] | 120 | CTRY_CZECH = 203, |
| 121 | CTRY_DENMARK = 208, |
| 122 | CTRY_DOMINICA = 212, |
| 123 | CTRY_DOMINICAN_REPUBLIC = 214, |
| 124 | CTRY_ECUADOR = 218, |
| 125 | CTRY_EGYPT = 818, |
| 126 | CTRY_EL_SALVADOR = 222, |
| 127 | CTRY_ESTONIA = 233, |
| 128 | CTRY_ETHIOPIA = 231, |
| 129 | CTRY_FINLAND = 246, |
| 130 | CTRY_FRANCE = 250, |
| 131 | CTRY_FRENCH_GUIANA = 254, |
| 132 | CTRY_FRENCH_POLYNESIA = 258, |
| 133 | CTRY_GEORGIA = 268, |
| 134 | CTRY_GERMANY = 276, |
| 135 | CTRY_GHANA = 288, |
Ashish Kumar Dhanotiya | ecf4db0 | 2017-09-12 14:35:46 +0530 | [diff] [blame] | 136 | CTRY_GIBRALTAR = 292, |
Amar Singhal | 76b4132 | 2015-12-09 14:39:17 -0800 | [diff] [blame] | 137 | CTRY_GREECE = 300, |
| 138 | CTRY_GREENLAND = 304, |
| 139 | CTRY_GRENADA = 308, |
| 140 | CTRY_GUADELOUPE = 312, |
| 141 | CTRY_GUAM = 316, |
| 142 | CTRY_GUATEMALA = 320, |
| 143 | CTRY_GUYANA = 328, |
| 144 | CTRY_HAITI = 332, |
| 145 | CTRY_HONDURAS = 340, |
| 146 | CTRY_HONG_KONG = 344, |
| 147 | CTRY_HUNGARY = 348, |
| 148 | CTRY_ICELAND = 352, |
| 149 | CTRY_INDIA = 356, |
| 150 | CTRY_INDONESIA = 360, |
Ashish Kumar Dhanotiya | ecf4db0 | 2017-09-12 14:35:46 +0530 | [diff] [blame] | 151 | CTRY_IRAQ = 368, |
Amar Singhal | 76b4132 | 2015-12-09 14:39:17 -0800 | [diff] [blame] | 152 | CTRY_IRELAND = 372, |
| 153 | CTRY_ISRAEL = 376, |
| 154 | CTRY_ITALY = 380, |
| 155 | CTRY_JAMAICA = 388, |
| 156 | CTRY_JORDAN = 400, |
| 157 | CTRY_KAZAKHSTAN = 398, |
| 158 | CTRY_KENYA = 404, |
Amar Singhal | 76b4132 | 2015-12-09 14:39:17 -0800 | [diff] [blame] | 159 | CTRY_KOREA_ROC = 410, |
| 160 | CTRY_KOREA_ROC_AP = 412, |
| 161 | CTRY_KUWAIT = 414, |
| 162 | CTRY_LATVIA = 428, |
| 163 | CTRY_LEBANON = 422, |
| 164 | CTRY_LESOTHO = 426, |
| 165 | CTRY_LIBYA = 434, |
| 166 | CTRY_LIECHTENSTEIN = 438, |
| 167 | CTRY_LITHUANIA = 440, |
| 168 | CTRY_LUXEMBOURG = 442, |
| 169 | CTRY_MACAU = 446, |
| 170 | CTRY_MACEDONIA = 807, |
| 171 | CTRY_MALAWI = 454, |
| 172 | CTRY_MALAYSIA = 458, |
| 173 | CTRY_MALDIVES = 462, |
| 174 | CTRY_MALTA = 470, |
| 175 | CTRY_MARSHALL_ISLANDS = 584, |
| 176 | CTRY_MARTINIQUE = 474, |
| 177 | CTRY_MAURITANIA = 478, |
| 178 | CTRY_MAURITIUS = 480, |
| 179 | CTRY_MAYOTTE = 175, |
| 180 | CTRY_MEXICO = 484, |
| 181 | CTRY_MICRONESIA = 583, |
| 182 | CTRY_MOLDOVA = 498, |
| 183 | CTRY_MONACO = 492, |
| 184 | CTRY_MONGOLIA = 496, |
| 185 | CTRY_MONTENEGRO = 499, |
| 186 | CTRY_MOROCCO = 504, |
Amar Singhal | 8b2e3f8 | 2016-06-01 15:42:03 -0700 | [diff] [blame] | 187 | CTRY_NAMIBIA = 516, |
Amar Singhal | 76b4132 | 2015-12-09 14:39:17 -0800 | [diff] [blame] | 188 | CTRY_NEPAL = 524, |
| 189 | CTRY_NETHERLANDS = 528, |
| 190 | CTRY_NETHERLANDS_ANTILLES = 530, |
| 191 | CTRY_NEW_ZEALAND = 554, |
| 192 | CTRY_NIGERIA = 566, |
| 193 | CTRY_NORTHERN_MARIANA_ISLANDS = 580, |
| 194 | CTRY_NICARAGUA = 558, |
| 195 | CTRY_NORWAY = 578, |
| 196 | CTRY_OMAN = 512, |
| 197 | CTRY_PAKISTAN = 586, |
| 198 | CTRY_PALAU = 585, |
| 199 | CTRY_PANAMA = 591, |
| 200 | CTRY_PAPUA_NEW_GUINEA = 598, |
| 201 | CTRY_PARAGUAY = 600, |
| 202 | CTRY_PERU = 604, |
| 203 | CTRY_PHILIPPINES = 608, |
| 204 | CTRY_POLAND = 616, |
| 205 | CTRY_PORTUGAL = 620, |
| 206 | CTRY_PUERTO_RICO = 630, |
| 207 | CTRY_QATAR = 634, |
| 208 | CTRY_REUNION = 638, |
| 209 | CTRY_ROMANIA = 642, |
| 210 | CTRY_RUSSIA = 643, |
| 211 | CTRY_RWANDA = 646, |
| 212 | CTRY_SAINT_BARTHELEMY = 652, |
| 213 | CTRY_SAINT_KITTS_AND_NEVIS = 659, |
| 214 | CTRY_SAINT_LUCIA = 662, |
| 215 | CTRY_SAINT_MARTIN = 663, |
| 216 | CTRY_SAINT_PIERRE_AND_MIQUELON = 666, |
| 217 | CTRY_SAINT_VINCENT_AND_THE_GRENADIENS = 670, |
| 218 | CTRY_SAMOA = 882, |
| 219 | CTRY_SAUDI_ARABIA = 682, |
| 220 | CTRY_SENEGAL = 686, |
| 221 | CTRY_SERBIA = 688, |
| 222 | CTRY_SINGAPORE = 702, |
| 223 | CTRY_SLOVAKIA = 703, |
| 224 | CTRY_SLOVENIA = 705, |
| 225 | CTRY_SOUTH_AFRICA = 710, |
| 226 | CTRY_SPAIN = 724, |
| 227 | CTRY_SURINAME = 740, |
| 228 | CTRY_SRI_LANKA = 144, |
| 229 | CTRY_SWEDEN = 752, |
| 230 | CTRY_SWITZERLAND = 756, |
Amar Singhal | 76b4132 | 2015-12-09 14:39:17 -0800 | [diff] [blame] | 231 | CTRY_TAIWAN = 158, |
| 232 | CTRY_TANZANIA = 834, |
| 233 | CTRY_THAILAND = 764, |
| 234 | CTRY_TOGO = 768, |
| 235 | CTRY_TRINIDAD_Y_TOBAGO = 780, |
| 236 | CTRY_TUNISIA = 788, |
| 237 | CTRY_TURKEY = 792, |
| 238 | CTRY_TURKS_AND_CAICOS = 796, |
| 239 | CTRY_UGANDA = 800, |
| 240 | CTRY_UKRAINE = 804, |
| 241 | CTRY_UAE = 784, |
| 242 | CTRY_UNITED_KINGDOM = 826, |
| 243 | CTRY_UNITED_STATES = 840, |
| 244 | CTRY_UNITED_STATES_AP = 841, |
| 245 | CTRY_UNITED_STATES_AP2 = 843, |
| 246 | CTRY_UNITED_STATES_PS = 842, |
| 247 | CTRY_URUGUAY = 858, |
| 248 | CTRY_UZBEKISTAN = 860, |
| 249 | CTRY_VANUATU = 548, |
| 250 | CTRY_VENEZUELA = 862, |
| 251 | CTRY_VIET_NAM = 704, |
| 252 | CTRY_VIRGIN_ISLANDS = 850, |
| 253 | CTRY_WALLIS_AND_FUTUNA = 876, |
| 254 | CTRY_YEMEN = 887, |
| 255 | CTRY_ZIMBABWE = 716, |
Amar Singhal | 76b4132 | 2015-12-09 14:39:17 -0800 | [diff] [blame] | 256 | CTRY_JAPAN9 = 4009, |
Amar Singhal | 76b4132 | 2015-12-09 14:39:17 -0800 | [diff] [blame] | 257 | CTRY_JAPAN15 = 4015, |
Amar Singhal | 76b4132 | 2015-12-09 14:39:17 -0800 | [diff] [blame] | 258 | CTRY_JAPAN48 = 4048, |
Amar Singhal | 76b4132 | 2015-12-09 14:39:17 -0800 | [diff] [blame] | 259 | CTRY_JAPAN55 = 4055, |
Ashish Kumar Dhanotiya | bfee589 | 2017-09-19 18:05:21 +0530 | [diff] [blame] | 260 | CTRY_JAPAN60 = 4060, |
Amar Singhal | 0e116c6 | 2016-04-21 16:52:30 -0700 | [diff] [blame] | 261 | CTRY_XA = 4100, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 262 | }; |
| 263 | |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 264 | enum reg_domain { |
| 265 | NO_ENUMRD = 0x00, |
| 266 | NULL1_WORLD = 0x03, |
| 267 | NULL1_ETSIB = 0x07, |
| 268 | NULL1_ETSIC = 0x08, |
| 269 | |
| 270 | FCC1_FCCA = 0x10, |
| 271 | FCC1_WORLD = 0x11, |
| 272 | FCC2_FCCA = 0x20, |
| 273 | FCC2_WORLD = 0x21, |
| 274 | FCC2_ETSIC = 0x22, |
| 275 | FCC3_FCCA = 0x3A, |
| 276 | FCC3_WORLD = 0x3B, |
| 277 | FCC3_ETSIC = 0x3F, |
| 278 | FCC4_FCCA = 0x12, |
| 279 | FCC5_FCCA = 0x13, |
| 280 | FCC6_FCCA = 0x14, |
| 281 | FCC7_FCCA = 0x15, |
| 282 | FCC8_FCCA = 0x16, |
| 283 | FCC6_WORLD = 0x23, |
| 284 | FCC9_FCCA = 0x17, |
| 285 | FCC10_FCCA = 0x18, |
| 286 | FCC11_WORLD = 0x19, |
Ashish Kumar Dhanotiya | bfee589 | 2017-09-19 18:05:21 +0530 | [diff] [blame] | 287 | FCC13_WORLD = 0xE4, |
| 288 | FCC14_FCCB = 0xE6, |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 289 | |
| 290 | ETSI1_WORLD = 0x37, |
| 291 | ETSI3_ETSIA = 0x32, |
| 292 | ETSI2_WORLD = 0x35, |
| 293 | ETSI3_WORLD = 0x36, |
| 294 | ETSI4_WORLD = 0x30, |
| 295 | ETSI4_ETSIC = 0x38, |
| 296 | ETSI5_WORLD = 0x39, |
| 297 | ETSI6_WORLD = 0x34, |
| 298 | ETSI_RESERVED = 0x33, |
| 299 | FRANCE_RES = 0x31, |
| 300 | ETSI7_WORLD = 0x3C, |
| 301 | ETSI8_WORLD = 0x3D, |
| 302 | ETSI9_WORLD = 0x3E, |
| 303 | ETSI10_WORLD = 0x24, |
| 304 | ETSI11_WORLD = 0x26, |
| 305 | |
| 306 | APL4_WORLD = 0x42, |
| 307 | APL3_FCCA = 0x50, |
| 308 | APL_RESERVED = 0x44, |
| 309 | APL2_WORLD = 0x45, |
| 310 | APL2_FCCA = 0x4D, |
| 311 | APL2_APLC = 0x46, |
| 312 | APL3_WORLD = 0x47, |
| 313 | APL2_APLD = 0x49, |
| 314 | APL1_WORLD = 0x52, |
| 315 | APL1_FCCA = 0x53, |
| 316 | APL1_APLA = 0x54, |
| 317 | APL1_ETSIC = 0x55, |
| 318 | APL2_ETSIC = 0x56, |
| 319 | APL5_WORLD = 0x58, |
| 320 | APL6_WORLD = 0x5B, |
| 321 | APL7_FCCA = 0x5C, |
| 322 | APL8_WORLD = 0x5D, |
| 323 | APL9_WORLD = 0x5E, |
| 324 | APL10_WORLD = 0x5F, |
| 325 | APL11_FCCA = 0x4F, |
| 326 | APL12_WORLD = 0x51, |
| 327 | APL13_WORLD = 0x5A, |
Amar Singhal | 8b2e3f8 | 2016-06-01 15:42:03 -0700 | [diff] [blame] | 328 | APL14_WORLD = 0x57, |
Amar Singhal | 0b51ecf | 2016-11-14 16:02:44 -0800 | [diff] [blame] | 329 | APL15_WORLD = 0x59, |
| 330 | APL16_WORLD = 0x70, |
Ashish Kumar Dhanotiya | bfee589 | 2017-09-19 18:05:21 +0530 | [diff] [blame] | 331 | APL17_ETSID = 0xE0, |
| 332 | APL20_WORLD = 0xE5, |
| 333 | APL23_WORLD = 0xE3, |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 334 | |
| 335 | WOR0_WORLD = 0x60, |
| 336 | WOR1_WORLD = 0x61, |
| 337 | WOR2_WORLD = 0x62, |
| 338 | WOR3_WORLD = 0x63, |
| 339 | WOR4_FCCA = 0x64, |
| 340 | WOR5_ETSIC = 0x65, |
| 341 | WOR01_WORLD = 0x66, |
| 342 | WOR02_WORLD = 0x67, |
| 343 | EU1_WORLD = 0x68, |
| 344 | WOR9_WORLD = 0x69, |
| 345 | WORA_WORLD = 0x6A, |
| 346 | WORB_WORLD = 0x6B, |
| 347 | WORC_WORLD = 0x6C, |
| 348 | |
| 349 | MKK3_MKKB = 0x80, |
| 350 | MKK3_MKKA2 = 0x81, |
| 351 | MKK3_MKKC = 0x82, |
| 352 | MKK4_MKKB = 0x83, |
| 353 | MKK4_MKKA2 = 0x84, |
| 354 | MKK4_MKKC = 0x85, |
| 355 | MKK5_MKKA = 0x99, |
| 356 | MKK5_FCCA = 0x9A, |
| 357 | MKK5_MKKB = 0x86, |
| 358 | MKK5_MKKA2 = 0x87, |
| 359 | MKK5_MKKC = 0x88, |
| 360 | MKK3_MKKA = 0xF0, |
| 361 | MKK3_MKKA1 = 0xF1, |
| 362 | MKK3_FCCA = 0xF2, |
| 363 | MKK4_MKKA = 0xF3, |
| 364 | MKK4_MKKA1 = 0xF4, |
| 365 | MKK4_FCCA = 0xF5, |
| 366 | MKK9_MKKA = 0xF6, |
| 367 | MKK9_FCCA = 0xFC, |
| 368 | MKK9_MKKA1 = 0xFD, |
| 369 | MKK9_MKKC = 0xFE, |
| 370 | MKK9_MKKA2 = 0xFF, |
| 371 | MKK10_MKKA = 0xF7, |
| 372 | MKK10_FCCA = 0xD0, |
| 373 | MKK10_MKKA1 = 0xD1, |
| 374 | MKK10_MKKC = 0xD2, |
| 375 | MKK10_MKKA2 = 0xD3, |
| 376 | MKK11_MKKA = 0xD4, |
| 377 | MKK11_FCCA = 0xD5, |
| 378 | MKK11_MKKA1 = 0xD6, |
| 379 | MKK11_MKKC = 0xD7, |
| 380 | MKK11_MKKA2 = 0xD8, |
Ashish Kumar Dhanotiya | bfee589 | 2017-09-19 18:05:21 +0530 | [diff] [blame] | 381 | MKK16_MKKC = 0xDF, |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 382 | |
| 383 | FCC1 = 0x0110, |
| 384 | FCC2 = 0x0120, |
| 385 | FCC3 = 0x0160, |
| 386 | FCC4 = 0x0165, |
| 387 | FCC5 = 0x0510, |
| 388 | FCC6 = 0x0610, |
| 389 | FCC7 = 0x0710, |
| 390 | FCC8 = 0x0810, |
| 391 | FCC9 = 0x0910, |
| 392 | FCC10 = 0x0B10, |
| 393 | FCC11 = 0x0B20, |
Ashish Kumar Dhanotiya | bfee589 | 2017-09-19 18:05:21 +0530 | [diff] [blame] | 394 | FCC13 = 0x0B60, |
| 395 | FCC14 = 0x0B70, |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 396 | |
| 397 | ETSI1 = 0x0130, |
| 398 | ETSI2 = 0x0230, |
| 399 | ETSI3 = 0x0330, |
| 400 | ETSI4 = 0x0430, |
| 401 | ETSI5 = 0x0530, |
| 402 | ETSI6 = 0x0630, |
| 403 | ETSI8 = 0x0830, |
| 404 | ETSI9 = 0x0930, |
| 405 | ETSI10 = 0x0D30, |
| 406 | ETSI11 = 0x0E30, |
| 407 | |
| 408 | APL1 = 0x0150, |
| 409 | APL2 = 0x0250, |
| 410 | APL3 = 0x0350, |
| 411 | APL4 = 0x0450, |
| 412 | APL5 = 0x0550, |
| 413 | APL6 = 0x0650, |
| 414 | APL7 = 0x0750, |
| 415 | APL8 = 0x0850, |
| 416 | APL9 = 0x0950, |
| 417 | APL10 = 0x1050, |
| 418 | APL11 = 0x1150, |
| 419 | APL12 = 0x1160, |
| 420 | APL13 = 0x1170, |
Amar Singhal | 8b2e3f8 | 2016-06-01 15:42:03 -0700 | [diff] [blame] | 421 | APL14 = 0x1180, |
Amar Singhal | 0b51ecf | 2016-11-14 16:02:44 -0800 | [diff] [blame] | 422 | APL15 = 0x1190, |
| 423 | APL16 = 0x1200, |
Ashish Kumar Dhanotiya | bfee589 | 2017-09-19 18:05:21 +0530 | [diff] [blame] | 424 | APL17 = 0x1210, |
| 425 | APL23 = 0x1280, |
| 426 | APL20 = 0x1250, |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 427 | |
| 428 | NULL1 = 0x0198, |
| 429 | MKK3 = 0x0340, |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 430 | MKK5 = 0x0540, |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 431 | MKK11 = 0x1140, |
Ashish Kumar Dhanotiya | bfee589 | 2017-09-19 18:05:21 +0530 | [diff] [blame] | 432 | MKK16 = 0x1640, |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 433 | |
| 434 | WORLD = 0x0199, |
| 435 | FCCA = 0x0A10, |
Ashish Kumar Dhanotiya | 7b1fe06 | 2017-12-06 15:51:10 +0530 | [diff] [blame] | 436 | FCCB = 0x0B90, |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 437 | MKKA = 0x0A40, |
| 438 | MKKC = 0x0A50, |
| 439 | ETSIC = 0x0C30, |
Ashish Kumar Dhanotiya | bfee589 | 2017-09-19 18:05:21 +0530 | [diff] [blame] | 440 | |
Naveen Rawat | 3b6068c | 2016-04-14 19:01:06 -0700 | [diff] [blame] | 441 | }; |
| 442 | |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 443 | /** |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 444 | * enum ctl_val: CTL value |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 445 | * @FCC: FCC |
| 446 | * @MKK: MKK |
| 447 | * @ETSI: ETSI |
| 448 | * @NO_CTL: no CTL |
| 449 | */ |
| 450 | enum ctl_val { |
| 451 | FCC = 0x10, |
| 452 | MKK = 0x40, |
| 453 | ETSI = 0x30, |
| 454 | NO_CTL = 0xff |
Amar Singhal | 2299511 | 2016-01-22 10:42:33 -0800 | [diff] [blame] | 455 | }; |
| 456 | |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 457 | /** |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 458 | * struct reg_dmn_pair: regulatory domain pair |
| 459 | * @reg_dmn_pair: reg domain pair |
| 460 | * @reg_dmn_5ghz: 5G reg domain |
| 461 | * @reg_dmn_2ghz: 2G reg domain |
| 462 | * @single_cc: country with this reg domain |
| 463 | */ |
| 464 | struct reg_dmn_pair { |
| 465 | uint16_t reg_dmn_pair; |
| 466 | uint16_t reg_dmn_5ghz; |
| 467 | uint16_t reg_dmn_2ghz; |
| 468 | uint16_t single_cc; |
| 469 | }; |
| 470 | |
| 471 | /** |
| 472 | * struct country_code_to_reg_dmn: country code to reg domain mapping |
| 473 | * @country_code: country code |
| 474 | * @reg_dmn_pair: regulatory domain pair |
| 475 | * @alpha2: country alpha2 |
| 476 | * @name: country name |
| 477 | */ |
| 478 | struct country_code_to_reg_dmn { |
| 479 | uint16_t country_code; |
| 480 | uint16_t reg_dmn_pair; |
| 481 | const char *alpha2; |
| 482 | const char *name; |
| 483 | }; |
| 484 | |
| 485 | /** |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 486 | * struct reg_dmn: regulatory domain structure |
| 487 | * @reg_dmn: regulatory domain |
| 488 | * @conformance_test_limit: CTL limit |
| 489 | */ |
Amar Singhal | 2299511 | 2016-01-22 10:42:33 -0800 | [diff] [blame] | 490 | struct reg_dmn { |
| 491 | uint16_t reg_dmn; |
| 492 | uint8_t conformance_test_limit; |
Naveen Rawat | 3b6068c | 2016-04-14 19:01:06 -0700 | [diff] [blame] | 493 | }; |
| 494 | |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 495 | /** |
Amar Singhal | a7bb01b | 2016-01-27 11:31:59 -0800 | [diff] [blame] | 496 | * struct reg_dmn_tables: reg domain table |
| 497 | * @reg_dmn_pairs: list of reg domain pairs |
| 498 | * @all_countries: list of countries |
| 499 | * @reg_dmns: list of reg domains |
| 500 | * @reg_dmn_pairs_cnt: count of reg domain pairs |
| 501 | * @all_countries_cnt: count of countries |
| 502 | * @reg_dmns_cnt: count of reg domains |
| 503 | */ |
Amar Singhal | 2299511 | 2016-01-22 10:42:33 -0800 | [diff] [blame] | 504 | struct reg_dmn_tables { |
| 505 | const struct reg_dmn_pair *reg_dmn_pairs; |
| 506 | const struct country_code_to_reg_dmn *all_countries; |
| 507 | const struct reg_dmn *reg_dmns; |
| 508 | uint16_t reg_dmn_pairs_cnt; |
| 509 | uint16_t all_countries_cnt; |
| 510 | uint16_t reg_dmns_cnt; |
| 511 | }; |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 512 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 513 | int32_t cds_fill_some_regulatory_info(struct regulatory *reg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 514 | int32_t cds_get_country_from_alpha2(uint8_t *alpha2); |
Amar Singhal | 2299511 | 2016-01-22 10:42:33 -0800 | [diff] [blame] | 515 | void cds_fill_and_send_ctl_to_fw(struct regulatory *reg); |
Liangwei Dong | ffd52d1 | 2017-07-19 02:45:00 -0400 | [diff] [blame] | 516 | /** |
| 517 | * cds_is_etsi_europe_country - check ETSI Europe country or not |
| 518 | * @country: country string with two Characters |
| 519 | * |
| 520 | * Return: true if country in ETSI Europe country list |
| 521 | */ |
| 522 | bool cds_is_etsi_europe_country(uint8_t *country); |
Amar Singhal | 2299511 | 2016-01-22 10:42:33 -0800 | [diff] [blame] | 523 | #endif /* __CDS_REGDOMAIN_H */ |