1#!/usr/bin/env python3 2# 3# Copyright 2017 - Google 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17import itertools 18 19BAND_2G = '2g' 20BAND_5G = '5g' 21CHANNEL_BANDWIDTH_20MHZ = 20 22CHANNEL_BANDWIDTH_40MHZ = 40 23CHANNEL_BANDWIDTH_80MHZ = 80 24CHANNEL_BANDWIDTH_160MHZ = 160 25WEP = 0 26WPA1 = 1 27WPA2 = 2 28WPA3 = 2 # same as wpa2 and wpa2/wpa3, distinguished by wpa_key_mgmt 29MIXED = 3 # applies to wpa/wpa2, and wpa/wpa2/wpa3, distinquished by wpa_key_mgmt 30ENT = 4 # get the correct constant 31MAX_WPA_PSK_LENGTH = 64 32MIN_WPA_PSK_LENGTH = 8 33MAX_WPA_PASSWORD_LENGTH = 63 34WPA_STRICT_REKEY = 1 35WPA_DEFAULT_CIPHER = 'TKIP' 36WPA2_DEFAULT_CIPER = 'CCMP' 37WPA_GROUP_KEY_ROTATION_TIME = 600 38WPA_STRICT_REKEY_DEFAULT = True 39WEP_STRING = 'wep' 40WPA_STRING = 'wpa' 41WPA2_STRING = 'wpa2' 42WPA_MIXED_STRING = 'wpa/wpa2' 43WPA3_STRING = 'wpa3' 44WPA2_WPA3_MIXED_STRING = 'wpa2/wpa3' 45WPA_WPA2_WPA3_MIXED_STRING = 'wpa/wpa2/wpa3' 46ENT_STRING = 'ent' 47ENT_KEY_MGMT = 'WPA-EAP' 48WPA_PSK_KEY_MGMT = 'WPA-PSK' 49SAE_KEY_MGMT = 'SAE' 50DUAL_WPA_PSK_SAE_KEY_MGMT = 'WPA-PSK SAE' 51SECURITY_STRING_TO_SECURITY_MODE_INT = { 52 WPA_STRING: WPA1, 53 WPA2_STRING: WPA2, 54 WPA_MIXED_STRING: MIXED, 55 WPA3_STRING: WPA3, 56 WPA2_WPA3_MIXED_STRING: WPA3, 57 WPA_WPA2_WPA3_MIXED_STRING: MIXED, 58 WEP_STRING: WEP, 59 ENT_STRING: ENT 60} 61SECURITY_STRING_TO_WPA_KEY_MGMT = { 62 WPA_STRING: WPA_PSK_KEY_MGMT, 63 WPA2_STRING: WPA_PSK_KEY_MGMT, 64 WPA_MIXED_STRING: WPA_PSK_KEY_MGMT, 65 WPA3_STRING: SAE_KEY_MGMT, 66 WPA2_WPA3_MIXED_STRING: DUAL_WPA_PSK_SAE_KEY_MGMT, 67 WPA_WPA2_WPA3_MIXED_STRING: DUAL_WPA_PSK_SAE_KEY_MGMT 68} 69WPA3_MODE_STRINGS = { 70 WPA3_STRING, WPA2_WPA3_MIXED_STRING, WPA_WPA2_WPA3_MIXED_STRING 71} 72 73SECURITY_STRING_TO_DEFAULT_TARGET_SECURITY = { 74 WEP_STRING: WEP_STRING, 75 WPA_STRING: WPA_STRING, 76 WPA2_STRING: WPA2_STRING, 77 WPA_MIXED_STRING: WPA2_STRING, 78 WPA3_STRING: WPA3_STRING, 79 WPA2_WPA3_MIXED_STRING: WPA3_STRING, 80 WPA_WPA2_WPA3_MIXED_STRING: WPA3_STRING 81} 82 83IEEE8021X = 1 84WLAN0_STRING = 'wlan0' 85WLAN1_STRING = 'wlan1' 86WLAN2_STRING = 'wlan2' 87WLAN3_STRING = 'wlan3' 88WLAN0_GALE = 'wlan-2400mhz' 89WLAN1_GALE = 'wlan-5000mhz' 90WEP_DEFAULT_KEY = 0 91WEP_HEX_LENGTH = [10, 26, 32, 58] 92WEP_STR_LENGTH = [5, 13, 16] 93WEP_DEFAULT_STR_LENGTH = 13 94AP_DEFAULT_CHANNEL_2G = 6 95AP_DEFAULT_CHANNEL_5G = 36 96AP_DEFAULT_MAX_SSIDS_2G = 8 97AP_DEFAULT_MAX_SSIDS_5G = 8 98AP_SSID_LENGTH_2G = 8 99AP_SSID_MIN_LENGTH_2G = 1 100AP_SSID_MAX_LENGTH_2G = 32 101AP_PASSPHRASE_LENGTH_2G = 10 102AP_SSID_LENGTH_5G = 8 103AP_SSID_MIN_LENGTH_5G = 1 104AP_SSID_MAX_LENGTH_5G = 32 105AP_PASSPHRASE_LENGTH_5G = 10 106INTERFACE_2G_LIST = [WLAN0_STRING, WLAN0_GALE] 107INTERFACE_5G_LIST = [WLAN1_STRING, WLAN1_GALE] 108HIGH_BEACON_INTERVAL = 300 109LOW_BEACON_INTERVAL = 100 110HIGH_DTIM = 3 111LOW_DTIM = 1 112 113# A mapping of frequency to channel number. This includes some 114# frequencies used outside the US. 115CHANNEL_MAP = { 116 2412: 1, 117 2417: 2, 118 2422: 3, 119 2427: 4, 120 2432: 5, 121 2437: 6, 122 2442: 7, 123 2447: 8, 124 2452: 9, 125 2457: 10, 126 2462: 11, 127 # 12, 13 are only legitimate outside the US. 128 2467: 12, 129 2472: 13, 130 # 14 is for Japan, DSSS and CCK only. 131 2484: 14, 132 # 34 valid in Japan. 133 5170: 34, 134 # 36-116 valid in the US, except 38, 42, and 46, which have 135 # mixed international support. 136 5180: 36, 137 5190: 38, 138 5200: 40, 139 5210: 42, 140 5220: 44, 141 5230: 46, 142 5240: 48, 143 # DFS channels. 144 5260: 52, 145 5280: 56, 146 5300: 60, 147 5320: 64, 148 5500: 100, 149 5520: 104, 150 5540: 108, 151 5560: 112, 152 5580: 116, 153 # 120, 124, 128 valid in Europe/Japan. 154 5600: 120, 155 5620: 124, 156 5640: 128, 157 # 132+ valid in US. 158 5660: 132, 159 5680: 136, 160 5700: 140, 161 # 144 is supported by a subset of WiFi chips 162 # (e.g. bcm4354, but not ath9k). 163 5720: 144, 164 # End DFS channels. 165 5745: 149, 166 5755: 151, 167 5765: 153, 168 5775: 155, 169 5795: 159, 170 5785: 157, 171 5805: 161, 172 5825: 165 173} 174FREQUENCY_MAP = {v: k for k, v in CHANNEL_MAP.items()} 175 176US_CHANNELS_2G = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] 177US_CHANNELS_5G = [ 178 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 179 132, 136, 140, 144, 149, 153, 157, 161, 165 180] 181 182LOWEST_5G_CHANNEL = 36 183 184MODE_11A = 'a' 185MODE_11B = 'b' 186MODE_11G = 'g' 187MODE_11N_MIXED = 'n-mixed' 188MODE_11N_PURE = 'n-only' 189MODE_11AC_MIXED = 'ac-mixed' 190MODE_11AC_PURE = 'ac-only' 191 192N_CAPABILITY_LDPC = object() 193N_CAPABILITY_HT20 = object() 194N_CAPABILITY_HT40_PLUS = object() 195N_CAPABILITY_HT40_MINUS = object() 196N_CAPABILITY_GREENFIELD = object() 197N_CAPABILITY_SGI20 = object() 198N_CAPABILITY_SGI40 = object() 199N_CAPABILITY_TX_STBC = object() 200N_CAPABILITY_RX_STBC1 = object() 201N_CAPABILITY_RX_STBC12 = object() 202N_CAPABILITY_RX_STBC123 = object() 203N_CAPABILITY_DSSS_CCK_40 = object() 204N_CAPABILITY_LSIG_TXOP_PROT = object() 205N_CAPABILITY_40_INTOLERANT = object() 206N_CAPABILITY_MAX_AMSDU_7935 = object() 207N_CAPABILITY_DELAY_BLOCK_ACK = object() 208N_CAPABILITY_SMPS_STATIC = object() 209N_CAPABILITY_SMPS_DYNAMIC = object() 210N_CAPABILITIES_MAPPING = { 211 N_CAPABILITY_LDPC: '[LDPC]', 212 N_CAPABILITY_HT20: '[HT20]', 213 N_CAPABILITY_HT40_PLUS: '[HT40+]', 214 N_CAPABILITY_HT40_MINUS: '[HT40-]', 215 N_CAPABILITY_GREENFIELD: '[GF]', 216 N_CAPABILITY_SGI20: '[SHORT-GI-20]', 217 N_CAPABILITY_SGI40: '[SHORT-GI-40]', 218 N_CAPABILITY_TX_STBC: '[TX-STBC]', 219 N_CAPABILITY_RX_STBC1: '[RX-STBC1]', 220 N_CAPABILITY_RX_STBC12: '[RX-STBC12]', 221 N_CAPABILITY_RX_STBC123: '[RX-STBC123]', 222 N_CAPABILITY_DSSS_CCK_40: '[DSSS_CCK-40]', 223 N_CAPABILITY_LSIG_TXOP_PROT: '[LSIG-TXOP-PROT]', 224 N_CAPABILITY_40_INTOLERANT: '[40-INTOLERANT]', 225 N_CAPABILITY_MAX_AMSDU_7935: '[MAX-AMSDU-7935]', 226 N_CAPABILITY_DELAY_BLOCK_ACK: '[DELAYED-BA]', 227 N_CAPABILITY_SMPS_STATIC: '[SMPS-STATIC]', 228 N_CAPABILITY_SMPS_DYNAMIC: '[SMPS-DYNAMIC]' 229} 230N_CAPABILITIES_MAPPING_INVERSE = { 231 v: k 232 for k, v in N_CAPABILITIES_MAPPING.items() 233} 234N_CAPABILITY_HT40_MINUS_CHANNELS = object() 235N_CAPABILITY_HT40_PLUS_CHANNELS = object() 236AC_CAPABILITY_VHT160 = object() 237AC_CAPABILITY_VHT160_80PLUS80 = object() 238AC_CAPABILITY_RXLDPC = object() 239AC_CAPABILITY_SHORT_GI_80 = object() 240AC_CAPABILITY_SHORT_GI_160 = object() 241AC_CAPABILITY_TX_STBC_2BY1 = object() 242AC_CAPABILITY_RX_STBC_1 = object() 243AC_CAPABILITY_RX_STBC_12 = object() 244AC_CAPABILITY_RX_STBC_123 = object() 245AC_CAPABILITY_RX_STBC_1234 = object() 246AC_CAPABILITY_SU_BEAMFORMER = object() 247AC_CAPABILITY_SU_BEAMFORMEE = object() 248AC_CAPABILITY_BF_ANTENNA_2 = object() 249AC_CAPABILITY_BF_ANTENNA_3 = object() 250AC_CAPABILITY_BF_ANTENNA_4 = object() 251AC_CAPABILITY_SOUNDING_DIMENSION_2 = object() 252AC_CAPABILITY_SOUNDING_DIMENSION_3 = object() 253AC_CAPABILITY_SOUNDING_DIMENSION_4 = object() 254AC_CAPABILITY_MU_BEAMFORMER = object() 255AC_CAPABILITY_MU_BEAMFORMEE = object() 256AC_CAPABILITY_VHT_TXOP_PS = object() 257AC_CAPABILITY_HTC_VHT = object() 258AC_CAPABILITY_MAX_A_MPDU_LEN_EXP0 = object() 259AC_CAPABILITY_MAX_A_MPDU_LEN_EXP1 = object() 260AC_CAPABILITY_MAX_A_MPDU_LEN_EXP2 = object() 261AC_CAPABILITY_MAX_A_MPDU_LEN_EXP3 = object() 262AC_CAPABILITY_MAX_A_MPDU_LEN_EXP4 = object() 263AC_CAPABILITY_MAX_A_MPDU_LEN_EXP5 = object() 264AC_CAPABILITY_MAX_A_MPDU_LEN_EXP6 = object() 265AC_CAPABILITY_MAX_A_MPDU_LEN_EXP7 = object() 266AC_CAPABILITY_VHT_LINK_ADAPT2 = object() 267AC_CAPABILITY_VHT_LINK_ADAPT3 = object() 268AC_CAPABILITY_RX_ANTENNA_PATTERN = object() 269AC_CAPABILITY_TX_ANTENNA_PATTERN = object() 270AC_CAPABILITY_MAX_MPDU_7991 = object() 271AC_CAPABILITY_MAX_MPDU_11454 = object() 272AC_CAPABILITIES_MAPPING = { 273 AC_CAPABILITY_VHT160: '[VHT160]', 274 AC_CAPABILITY_VHT160_80PLUS80: '[VHT160-80PLUS80]', 275 AC_CAPABILITY_RXLDPC: '[RXLDPC]', 276 AC_CAPABILITY_SHORT_GI_80: '[SHORT-GI-80]', 277 AC_CAPABILITY_SHORT_GI_160: '[SHORT-GI-160]', 278 AC_CAPABILITY_TX_STBC_2BY1: '[TX-STBC-2BY1]', 279 AC_CAPABILITY_RX_STBC_1: '[RX-STBC-1]', 280 AC_CAPABILITY_RX_STBC_12: '[RX-STBC-12]', 281 AC_CAPABILITY_RX_STBC_123: '[RX-STBC-123]', 282 AC_CAPABILITY_RX_STBC_1234: '[RX-STBC-1234]', 283 AC_CAPABILITY_SU_BEAMFORMER: '[SU-BEAMFORMER]', 284 AC_CAPABILITY_SU_BEAMFORMEE: '[SU-BEAMFORMEE]', 285 AC_CAPABILITY_BF_ANTENNA_2: '[BF-ANTENNA-2]', 286 AC_CAPABILITY_BF_ANTENNA_3: '[BF-ANTENNA-3]', 287 AC_CAPABILITY_BF_ANTENNA_4: '[BF-ANTENNA-4]', 288 AC_CAPABILITY_SOUNDING_DIMENSION_2: '[SOUNDING-DIMENSION-2]', 289 AC_CAPABILITY_SOUNDING_DIMENSION_3: '[SOUNDING-DIMENSION-3]', 290 AC_CAPABILITY_SOUNDING_DIMENSION_4: '[SOUNDING-DIMENSION-4]', 291 AC_CAPABILITY_MU_BEAMFORMER: '[MU-BEAMFORMER]', 292 AC_CAPABILITY_MU_BEAMFORMEE: '[MU-BEAMFORMEE]', 293 AC_CAPABILITY_VHT_TXOP_PS: '[VHT-TXOP-PS]', 294 AC_CAPABILITY_HTC_VHT: '[HTC-VHT]', 295 AC_CAPABILITY_MAX_A_MPDU_LEN_EXP0: '[MAX-A-MPDU-LEN-EXP0]', 296 AC_CAPABILITY_MAX_A_MPDU_LEN_EXP1: '[MAX-A-MPDU-LEN-EXP1]', 297 AC_CAPABILITY_MAX_A_MPDU_LEN_EXP2: '[MAX-A-MPDU-LEN-EXP2]', 298 AC_CAPABILITY_MAX_A_MPDU_LEN_EXP3: '[MAX-A-MPDU-LEN-EXP3]', 299 AC_CAPABILITY_MAX_A_MPDU_LEN_EXP4: '[MAX-A-MPDU-LEN-EXP4]', 300 AC_CAPABILITY_MAX_A_MPDU_LEN_EXP5: '[MAX-A-MPDU-LEN-EXP5]', 301 AC_CAPABILITY_MAX_A_MPDU_LEN_EXP6: '[MAX-A-MPDU-LEN-EXP6]', 302 AC_CAPABILITY_MAX_A_MPDU_LEN_EXP7: '[MAX-A-MPDU-LEN-EXP7]', 303 AC_CAPABILITY_VHT_LINK_ADAPT2: '[VHT-LINK-ADAPT2]', 304 AC_CAPABILITY_VHT_LINK_ADAPT3: '[VHT-LINK-ADAPT3]', 305 AC_CAPABILITY_RX_ANTENNA_PATTERN: '[RX-ANTENNA-PATTERN]', 306 AC_CAPABILITY_TX_ANTENNA_PATTERN: '[TX-ANTENNA-PATTERN]', 307 AC_CAPABILITY_MAX_MPDU_11454: '[MAX-MPDU-11454]', 308 AC_CAPABILITY_MAX_MPDU_7991: '[MAX-MPDU-7991]' 309} 310AC_CAPABILITIES_MAPPING_INVERSE = { 311 v: k 312 for k, v in AC_CAPABILITIES_MAPPING.items() 313} 314VHT_CHANNEL_WIDTH_40 = 0 315VHT_CHANNEL_WIDTH_80 = 1 316VHT_CHANNEL_WIDTH_160 = 2 317VHT_CHANNEL_WIDTH_80_80 = 3 318 319VHT_CHANNEL = { 320 40: VHT_CHANNEL_WIDTH_40, 321 80: VHT_CHANNEL_WIDTH_80, 322 160: VHT_CHANNEL_WIDTH_160 323} 324 325# This is a loose merging of the rules for US and EU regulatory 326# domains as taken from IEEE Std 802.11-2012 Appendix E. For instance, 327# we tolerate HT40 in channels 149-161 (not allowed in EU), but also 328# tolerate HT40+ on channel 7 (not allowed in the US). We take the loose 329# definition so that we don't prohibit testing in either domain. 330HT40_ALLOW_MAP = { 331 N_CAPABILITY_HT40_MINUS_CHANNELS: 332 tuple( 333 itertools.chain(range(6, 14), range(40, 65, 8), range(104, 145, 8), 334 [153, 161])), 335 N_CAPABILITY_HT40_PLUS_CHANNELS: 336 tuple( 337 itertools.chain(range(1, 8), range(36, 61, 8), range(100, 141, 8), 338 [149, 157])) 339} 340 341PMF_SUPPORT_DISABLED = 0 342PMF_SUPPORT_ENABLED = 1 343PMF_SUPPORT_REQUIRED = 2 344PMF_SUPPORT_VALUES = (PMF_SUPPORT_DISABLED, PMF_SUPPORT_ENABLED, 345 PMF_SUPPORT_REQUIRED) 346 347DRIVER_NAME = 'nl80211' 348 349CENTER_CHANNEL_MAP = { 350 VHT_CHANNEL_WIDTH_40: { 351 'delta': 352 2, 353 'channels': ((36, 40), (44, 48), (52, 56), (60, 64), (100, 104), 354 (108, 112), (116, 120), (124, 128), (132, 136), 355 (140, 144), (149, 153), (157, 161)) 356 }, 357 VHT_CHANNEL_WIDTH_80: { 358 'delta': 359 6, 360 'channels': 361 ((36, 48), (52, 64), (100, 112), (116, 128), (132, 144), (149, 161)) 362 }, 363 VHT_CHANNEL_WIDTH_160: { 364 'delta': 14, 365 'channels': ((36, 64), (100, 128)) 366 } 367} 368 369OFDM_DATA_RATES = {'supported_rates': '60 90 120 180 240 360 480 540'} 370 371CCK_DATA_RATES = {'supported_rates': '10 20 55 110'} 372 373CCK_AND_OFDM_DATA_RATES = { 374 'supported_rates': '10 20 55 110 60 90 120 180 240 360 480 540' 375} 376 377OFDM_ONLY_BASIC_RATES = {'basic_rates': '60 120 240'} 378 379CCK_AND_OFDM_BASIC_RATES = {'basic_rates': '10 20 55 110'} 380 381WEP_AUTH = { 382 'open': { 383 'auth_algs': 1 384 }, 385 'shared': { 386 'auth_algs': 2 387 }, 388 'open_and_shared': { 389 'auth_algs': 3 390 } 391} 392 393WMM_11B_DEFAULT_PARAMS = { 394 'wmm_ac_bk_cwmin': 5, 395 'wmm_ac_bk_cwmax': 10, 396 'wmm_ac_bk_aifs': 7, 397 'wmm_ac_bk_txop_limit': 0, 398 'wmm_ac_be_aifs': 3, 399 'wmm_ac_be_cwmin': 5, 400 'wmm_ac_be_cwmax': 7, 401 'wmm_ac_be_txop_limit': 0, 402 'wmm_ac_vi_aifs': 2, 403 'wmm_ac_vi_cwmin': 4, 404 'wmm_ac_vi_cwmax': 5, 405 'wmm_ac_vi_txop_limit': 188, 406 'wmm_ac_vo_aifs': 2, 407 'wmm_ac_vo_cwmin': 3, 408 'wmm_ac_vo_cwmax': 4, 409 'wmm_ac_vo_txop_limit': 102 410} 411 412WMM_PHYS_11A_11G_11N_11AC_DEFAULT_PARAMS = { 413 'wmm_ac_bk_cwmin': 4, 414 'wmm_ac_bk_cwmax': 10, 415 'wmm_ac_bk_aifs': 7, 416 'wmm_ac_bk_txop_limit': 0, 417 'wmm_ac_be_aifs': 3, 418 'wmm_ac_be_cwmin': 4, 419 'wmm_ac_be_cwmax': 10, 420 'wmm_ac_be_txop_limit': 0, 421 'wmm_ac_vi_aifs': 2, 422 'wmm_ac_vi_cwmin': 3, 423 'wmm_ac_vi_cwmax': 4, 424 'wmm_ac_vi_txop_limit': 94, 425 'wmm_ac_vo_aifs': 2, 426 'wmm_ac_vo_cwmin': 2, 427 'wmm_ac_vo_cwmax': 3, 428 'wmm_ac_vo_txop_limit': 47 429} 430 431WMM_NON_DEFAULT_PARAMS = { 432 'wmm_ac_bk_cwmin': 5, 433 'wmm_ac_bk_cwmax': 9, 434 'wmm_ac_bk_aifs': 3, 435 'wmm_ac_bk_txop_limit': 94, 436 'wmm_ac_be_aifs': 2, 437 'wmm_ac_be_cwmin': 2, 438 'wmm_ac_be_cwmax': 8, 439 'wmm_ac_be_txop_limit': 0, 440 'wmm_ac_vi_aifs': 1, 441 'wmm_ac_vi_cwmin': 7, 442 'wmm_ac_vi_cwmax': 10, 443 'wmm_ac_vi_txop_limit': 47, 444 'wmm_ac_vo_aifs': 1, 445 'wmm_ac_vo_cwmin': 6, 446 'wmm_ac_vo_cwmax': 10, 447 'wmm_ac_vo_txop_limit': 94 448} 449 450WMM_DEGRADED_VO_PARAMS = { 451 'wmm_ac_bk_cwmin': 7, 452 'wmm_ac_bk_cwmax': 15, 453 'wmm_ac_bk_aifs': 2, 454 'wmm_ac_bk_txop_limit': 0, 455 'wmm_ac_be_aifs': 2, 456 'wmm_ac_be_cwmin': 7, 457 'wmm_ac_be_cwmax': 15, 458 'wmm_ac_be_txop_limit': 0, 459 'wmm_ac_vi_aifs': 2, 460 'wmm_ac_vi_cwmin': 7, 461 'wmm_ac_vi_cwmax': 15, 462 'wmm_ac_vi_txop_limit': 94, 463 'wmm_ac_vo_aifs': 10, 464 'wmm_ac_vo_cwmin': 7, 465 'wmm_ac_vo_cwmax': 15, 466 'wmm_ac_vo_txop_limit': 47 467} 468 469WMM_DEGRADED_VI_PARAMS = { 470 'wmm_ac_bk_cwmin': 7, 471 'wmm_ac_bk_cwmax': 15, 472 'wmm_ac_bk_aifs': 2, 473 'wmm_ac_bk_txop_limit': 0, 474 'wmm_ac_be_aifs': 2, 475 'wmm_ac_be_cwmin': 7, 476 'wmm_ac_be_cwmax': 15, 477 'wmm_ac_be_txop_limit': 0, 478 'wmm_ac_vi_aifs': 10, 479 'wmm_ac_vi_cwmin': 7, 480 'wmm_ac_vi_cwmax': 15, 481 'wmm_ac_vi_txop_limit': 94, 482 'wmm_ac_vo_aifs': 2, 483 'wmm_ac_vo_cwmin': 7, 484 'wmm_ac_vo_cwmax': 15, 485 'wmm_ac_vo_txop_limit': 47 486} 487 488WMM_IMPROVE_BE_PARAMS = { 489 'wmm_ac_bk_cwmin': 7, 490 'wmm_ac_bk_cwmax': 15, 491 'wmm_ac_bk_aifs': 10, 492 'wmm_ac_bk_txop_limit': 0, 493 'wmm_ac_be_aifs': 2, 494 'wmm_ac_be_cwmin': 7, 495 'wmm_ac_be_cwmax': 15, 496 'wmm_ac_be_txop_limit': 0, 497 'wmm_ac_vi_aifs': 10, 498 'wmm_ac_vi_cwmin': 7, 499 'wmm_ac_vi_cwmax': 15, 500 'wmm_ac_vi_txop_limit': 94, 501 'wmm_ac_vo_aifs': 10, 502 'wmm_ac_vo_cwmin': 7, 503 'wmm_ac_vo_cwmax': 15, 504 'wmm_ac_vo_txop_limit': 47 505} 506 507WMM_IMPROVE_BK_PARAMS = { 508 'wmm_ac_bk_cwmin': 7, 509 'wmm_ac_bk_cwmax': 15, 510 'wmm_ac_bk_aifs': 2, 511 'wmm_ac_bk_txop_limit': 0, 512 'wmm_ac_be_aifs': 10, 513 'wmm_ac_be_cwmin': 7, 514 'wmm_ac_be_cwmax': 15, 515 'wmm_ac_be_txop_limit': 0, 516 'wmm_ac_vi_aifs': 10, 517 'wmm_ac_vi_cwmin': 7, 518 'wmm_ac_vi_cwmax': 15, 519 'wmm_ac_vi_txop_limit': 94, 520 'wmm_ac_vo_aifs': 10, 521 'wmm_ac_vo_cwmin': 7, 522 'wmm_ac_vo_cwmax': 15, 523 'wmm_ac_vo_txop_limit': 47 524} 525 526WMM_ACM_BK = {'wmm_ac_bk_acm': 1} 527WMM_ACM_BE = {'wmm_ac_be_acm': 1} 528WMM_ACM_VI = {'wmm_ac_vi_acm': 1} 529WMM_ACM_VO = {'wmm_ac_vo_acm': 1} 530 531UAPSD_ENABLED = {'uapsd_advertisement_enabled': 1} 532 533UTF_8_SSID = {'utf8_ssid': 1} 534 535ENABLE_RRM_BEACON_REPORT = {'rrm_beacon_report': 1} 536ENABLE_RRM_NEIGHBOR_REPORT = {'rrm_neighbor_report': 1} 537 538VENDOR_IE = { 539 'correct_length_beacon': { 540 'vendor_elements': 'dd0411223301' 541 }, 542 'too_short_length_beacon': { 543 'vendor_elements': 'dd0311223301' 544 }, 545 'too_long_length_beacon': { 546 'vendor_elements': 'dd0511223301' 547 }, 548 'zero_length_beacon_with_data': { 549 'vendor_elements': 'dd0011223301' 550 }, 551 'zero_length_beacon_without_data': { 552 'vendor_elements': 'dd00' 553 }, 554 'simliar_to_wpa': { 555 'vendor_elements': 'dd040050f203' 556 }, 557 'correct_length_association_response': { 558 'assocresp_elements': 'dd0411223301' 559 }, 560 'too_short_length_association_response': { 561 'assocresp_elements': 'dd0311223301' 562 }, 563 'too_long_length_association_response': { 564 'assocresp_elements': 'dd0511223301' 565 }, 566 'zero_length_association_response_with_data': { 567 'assocresp_elements': 'dd0011223301' 568 }, 569 'zero_length_association_response_without_data': { 570 'assocresp_elements': 'dd00' 571 } 572} 573 574ENABLE_IEEE80211D = {'ieee80211d': 1} 575 576COUNTRY_STRING = { 577 'ALL': { 578 'country3': '0x20' 579 }, 580 'OUTDOOR': { 581 'country3': '0x4f' 582 }, 583 'INDOOR': { 584 'country3': '0x49' 585 }, 586 'NONCOUNTRY': { 587 'country3': '0x58' 588 }, 589 'GLOBAL': { 590 'country3': '0x04' 591 } 592} 593 594COUNTRY_CODE = { 595 'AFGHANISTAN': { 596 'country_code': 'AF' 597 }, 598 'ALAND_ISLANDS': { 599 'country_code': 'AX' 600 }, 601 'ALBANIA': { 602 'country_code': 'AL' 603 }, 604 'ALGERIA': { 605 'country_code': 'DZ' 606 }, 607 'AMERICAN_SAMOA': { 608 'country_code': 'AS' 609 }, 610 'ANDORRA': { 611 'country_code': 'AD' 612 }, 613 'ANGOLA': { 614 'country_code': 'AO' 615 }, 616 'ANGUILLA': { 617 'country_code': 'AI' 618 }, 619 'ANTARCTICA': { 620 'country_code': 'AQ' 621 }, 622 'ANTIGUA_AND_BARBUDA': { 623 'country_code': 'AG' 624 }, 625 'ARGENTINA': { 626 'country_code': 'AR' 627 }, 628 'ARMENIA': { 629 'country_code': 'AM' 630 }, 631 'ARUBA': { 632 'country_code': 'AW' 633 }, 634 'AUSTRALIA': { 635 'country_code': 'AU' 636 }, 637 'AUSTRIA': { 638 'country_code': 'AT' 639 }, 640 'AZERBAIJAN': { 641 'country_code': 'AZ' 642 }, 643 'BAHAMAS': { 644 'country_code': 'BS' 645 }, 646 'BAHRAIN': { 647 'country_code': 'BH' 648 }, 649 'BANGLADESH': { 650 'country_code': 'BD' 651 }, 652 'BARBADOS': { 653 'country_code': 'BB' 654 }, 655 'BELARUS': { 656 'country_code': 'BY' 657 }, 658 'BELGIUM': { 659 'country_code': 'BE' 660 }, 661 'BELIZE': { 662 'country_code': 'BZ' 663 }, 664 'BENIN': { 665 'country_code': 'BJ' 666 }, 667 'BERMUDA': { 668 'country_code': 'BM' 669 }, 670 'BHUTAN': { 671 'country_code': 'BT' 672 }, 673 'BOLIVIA': { 674 'country_code': 'BO' 675 }, 676 'BONAIRE': { 677 'country_code': 'BQ' 678 }, 679 'BOSNIA_AND_HERZEGOVINA': { 680 'country_code': 'BA' 681 }, 682 'BOTSWANA': { 683 'country_code': 'BW' 684 }, 685 'BOUVET_ISLAND': { 686 'country_code': 'BV' 687 }, 688 'BRAZIL': { 689 'country_code': 'BR' 690 }, 691 'BRITISH_INDIAN_OCEAN_TERRITORY': { 692 'country_code': 'IO' 693 }, 694 'BRUNEI_DARUSSALAM': { 695 'country_code': 'BN' 696 }, 697 'BULGARIA': { 698 'country_code': 'BG' 699 }, 700 'BURKINA_FASO': { 701 'country_code': 'BF' 702 }, 703 'BURUNDI': { 704 'country_code': 'BI' 705 }, 706 'CAMBODIA': { 707 'country_code': 'KH' 708 }, 709 'CAMEROON': { 710 'country_code': 'CM' 711 }, 712 'CANADA': { 713 'country_code': 'CA' 714 }, 715 'CAPE_VERDE': { 716 'country_code': 'CV' 717 }, 718 'CAYMAN_ISLANDS': { 719 'country_code': 'KY' 720 }, 721 'CENTRAL_AFRICAN_REPUBLIC': { 722 'country_code': 'CF' 723 }, 724 'CHAD': { 725 'country_code': 'TD' 726 }, 727 'CHILE': { 728 'country_code': 'CL' 729 }, 730 'CHINA': { 731 'country_code': 'CN' 732 }, 733 'CHRISTMAS_ISLAND': { 734 'country_code': 'CX' 735 }, 736 'COCOS_ISLANDS': { 737 'country_code': 'CC' 738 }, 739 'COLOMBIA': { 740 'country_code': 'CO' 741 }, 742 'COMOROS': { 743 'country_code': 'KM' 744 }, 745 'CONGO': { 746 'country_code': 'CG' 747 }, 748 'DEMOCRATIC_REPUBLIC_CONGO': { 749 'country_code': 'CD' 750 }, 751 'COOK_ISLANDS': { 752 'country_code': 'CK' 753 }, 754 'COSTA_RICA': { 755 'country_code': 'CR' 756 }, 757 'COTE_D_IVOIRE': { 758 'country_code': 'CI' 759 }, 760 'CROATIA': { 761 'country_code': 'HR' 762 }, 763 'CUBA': { 764 'country_code': 'CU' 765 }, 766 'CURACAO': { 767 'country_code': 'CW' 768 }, 769 'CYPRUS': { 770 'country_code': 'CY' 771 }, 772 'CZECH_REPUBLIC': { 773 'country_code': 'CZ' 774 }, 775 'DENMARK': { 776 'country_code': 'DK' 777 }, 778 'DJIBOUTI': { 779 'country_code': 'DJ' 780 }, 781 'DOMINICA': { 782 'country_code': 'DM' 783 }, 784 'DOMINICAN_REPUBLIC': { 785 'country_code': 'DO' 786 }, 787 'ECUADOR': { 788 'country_code': 'EC' 789 }, 790 'EGYPT': { 791 'country_code': 'EG' 792 }, 793 'EL_SALVADOR': { 794 'country_code': 'SV' 795 }, 796 'EQUATORIAL_GUINEA': { 797 'country_code': 'GQ' 798 }, 799 'ERITREA': { 800 'country_code': 'ER' 801 }, 802 'ESTONIA': { 803 'country_code': 'EE' 804 }, 805 'ETHIOPIA': { 806 'country_code': 'ET' 807 }, 808 'FALKLAND_ISLANDS_(MALVINAS)': { 809 'country_code': 'FK' 810 }, 811 'FAROE_ISLANDS': { 812 'country_code': 'FO' 813 }, 814 'FIJI': { 815 'country_code': 'FJ' 816 }, 817 'FINLAND': { 818 'country_code': 'FI' 819 }, 820 'FRANCE': { 821 'country_code': 'FR' 822 }, 823 'FRENCH_GUIANA': { 824 'country_code': 'GF' 825 }, 826 'FRENCH_POLYNESIA': { 827 'country_code': 'PF' 828 }, 829 'FRENCH_SOUTHERN_TERRITORIES': { 830 'country_code': 'TF' 831 }, 832 'GABON': { 833 'country_code': 'GA' 834 }, 835 'GAMBIA': { 836 'country_code': 'GM' 837 }, 838 'GEORGIA': { 839 'country_code': 'GE' 840 }, 841 'GERMANY': { 842 'country_code': 'DE' 843 }, 844 'GHANA': { 845 'country_code': 'GH' 846 }, 847 'GIBRALTAR': { 848 'country_code': 'GI' 849 }, 850 'GREECE': { 851 'country_code': 'GR' 852 }, 853 'GREENLAND': { 854 'country_code': 'GL' 855 }, 856 'GRENADA': { 857 'country_code': 'GD' 858 }, 859 'GUADELOUPE': { 860 'country_code': 'GP' 861 }, 862 'GUAM': { 863 'country_code': 'GU' 864 }, 865 'GUATEMALA': { 866 'country_code': 'GT' 867 }, 868 'GUERNSEY': { 869 'country_code': 'GG' 870 }, 871 'GUINEA': { 872 'country_code': 'GN' 873 }, 874 'GUINEA-BISSAU': { 875 'country_code': 'GW' 876 }, 877 'GUYANA': { 878 'country_code': 'GY' 879 }, 880 'HAITI': { 881 'country_code': 'HT' 882 }, 883 'HEARD_ISLAND_AND_MCDONALD_ISLANDS': { 884 'country_code': 'HM' 885 }, 886 'VATICAN_CITY_STATE': { 887 'country_code': 'VA' 888 }, 889 'HONDURAS': { 890 'country_code': 'HN' 891 }, 892 'HONG_KONG': { 893 'country_code': 'HK' 894 }, 895 'HUNGARY': { 896 'country_code': 'HU' 897 }, 898 'ICELAND': { 899 'country_code': 'IS' 900 }, 901 'INDIA': { 902 'country_code': 'IN' 903 }, 904 'INDONESIA': { 905 'country_code': 'ID' 906 }, 907 'IRAN': { 908 'country_code': 'IR' 909 }, 910 'IRAQ': { 911 'country_code': 'IQ' 912 }, 913 'IRELAND': { 914 'country_code': 'IE' 915 }, 916 'ISLE_OF_MAN': { 917 'country_code': 'IM' 918 }, 919 'ISRAEL': { 920 'country_code': 'IL' 921 }, 922 'ITALY': { 923 'country_code': 'IT' 924 }, 925 'JAMAICA': { 926 'country_code': 'JM' 927 }, 928 'JAPAN': { 929 'country_code': 'JP' 930 }, 931 'JERSEY': { 932 'country_code': 'JE' 933 }, 934 'JORDAN': { 935 'country_code': 'JO' 936 }, 937 'KAZAKHSTAN': { 938 'country_code': 'KZ' 939 }, 940 'KENYA': { 941 'country_code': 'KE' 942 }, 943 'KIRIBATI': { 944 'country_code': 'KI' 945 }, 946 'DEMOCRATIC_PEOPLE_S_REPUBLIC_OF_KOREA': { 947 'country_code': 'KP' 948 }, 949 'REPUBLIC_OF_KOREA': { 950 'country_code': 'KR' 951 }, 952 'KUWAIT': { 953 'country_code': 'KW' 954 }, 955 'KYRGYZSTAN': { 956 'country_code': 'KG' 957 }, 958 'LAO': { 959 'country_code': 'LA' 960 }, 961 'LATVIA': { 962 'country_code': 'LV' 963 }, 964 'LEBANON': { 965 'country_code': 'LB' 966 }, 967 'LESOTHO': { 968 'country_code': 'LS' 969 }, 970 'LIBERIA': { 971 'country_code': 'LR' 972 }, 973 'LIBYA': { 974 'country_code': 'LY' 975 }, 976 'LIECHTENSTEIN': { 977 'country_code': 'LI' 978 }, 979 'LITHUANIA': { 980 'country_code': 'LT' 981 }, 982 'LUXEMBOURG': { 983 'country_code': 'LU' 984 }, 985 'MACAO': { 986 'country_code': 'MO' 987 }, 988 'MACEDONIA': { 989 'country_code': 'MK' 990 }, 991 'MADAGASCAR': { 992 'country_code': 'MG' 993 }, 994 'MALAWI': { 995 'country_code': 'MW' 996 }, 997 'MALAYSIA': { 998 'country_code': 'MY' 999 }, 1000 'MALDIVES': { 1001 'country_code': 'MV' 1002 }, 1003 'MALI': { 1004 'country_code': 'ML' 1005 }, 1006 'MALTA': { 1007 'country_code': 'MT' 1008 }, 1009 'MARSHALL_ISLANDS': { 1010 'country_code': 'MH' 1011 }, 1012 'MARTINIQUE': { 1013 'country_code': 'MQ' 1014 }, 1015 'MAURITANIA': { 1016 'country_code': 'MR' 1017 }, 1018 'MAURITIUS': { 1019 'country_code': 'MU' 1020 }, 1021 'MAYOTTE': { 1022 'country_code': 'YT' 1023 }, 1024 'MEXICO': { 1025 'country_code': 'MX' 1026 }, 1027 'MICRONESIA': { 1028 'country_code': 'FM' 1029 }, 1030 'MOLDOVA': { 1031 'country_code': 'MD' 1032 }, 1033 'MONACO': { 1034 'country_code': 'MC' 1035 }, 1036 'MONGOLIA': { 1037 'country_code': 'MN' 1038 }, 1039 'MONTENEGRO': { 1040 'country_code': 'ME' 1041 }, 1042 'MONTSERRAT': { 1043 'country_code': 'MS' 1044 }, 1045 'MOROCCO': { 1046 'country_code': 'MA' 1047 }, 1048 'MOZAMBIQUE': { 1049 'country_code': 'MZ' 1050 }, 1051 'MYANMAR': { 1052 'country_code': 'MM' 1053 }, 1054 'NAMIBIA': { 1055 'country_code': 'NA' 1056 }, 1057 'NAURU': { 1058 'country_code': 'NR' 1059 }, 1060 'NEPAL': { 1061 'country_code': 'NP' 1062 }, 1063 'NETHERLANDS': { 1064 'country_code': 'NL' 1065 }, 1066 'NEW_CALEDONIA': { 1067 'country_code': 'NC' 1068 }, 1069 'NEW_ZEALAND': { 1070 'country_code': 'NZ' 1071 }, 1072 'NICARAGUA': { 1073 'country_code': 'NI' 1074 }, 1075 'NIGER': { 1076 'country_code': 'NE' 1077 }, 1078 'NIGERIA': { 1079 'country_code': 'NG' 1080 }, 1081 'NIUE': { 1082 'country_code': 'NU' 1083 }, 1084 'NORFOLK_ISLAND': { 1085 'country_code': 'NF' 1086 }, 1087 'NORTHERN_MARIANA_ISLANDS': { 1088 'country_code': 'MP' 1089 }, 1090 'NORWAY': { 1091 'country_code': 'NO' 1092 }, 1093 'OMAN': { 1094 'country_code': 'OM' 1095 }, 1096 'PAKISTAN': { 1097 'country_code': 'PK' 1098 }, 1099 'PALAU': { 1100 'country_code': 'PW' 1101 }, 1102 'PALESTINE': { 1103 'country_code': 'PS' 1104 }, 1105 'PANAMA': { 1106 'country_code': 'PA' 1107 }, 1108 'PAPUA_NEW_GUINEA': { 1109 'country_code': 'PG' 1110 }, 1111 'PARAGUAY': { 1112 'country_code': 'PY' 1113 }, 1114 'PERU': { 1115 'country_code': 'PE' 1116 }, 1117 'PHILIPPINES': { 1118 'country_code': 'PH' 1119 }, 1120 'PITCAIRN': { 1121 'country_code': 'PN' 1122 }, 1123 'POLAND': { 1124 'country_code': 'PL' 1125 }, 1126 'PORTUGAL': { 1127 'country_code': 'PT' 1128 }, 1129 'PUERTO_RICO': { 1130 'country_code': 'PR' 1131 }, 1132 'QATAR': { 1133 'country_code': 'QA' 1134 }, 1135 'RÉUNION': { 1136 'country_code': 'RE' 1137 }, 1138 'ROMANIA': { 1139 'country_code': 'RO' 1140 }, 1141 'RUSSIAN_FEDERATION': { 1142 'country_code': 'RU' 1143 }, 1144 'RWANDA': { 1145 'country_code': 'RW' 1146 }, 1147 'SAINT_BARTHELEMY': { 1148 'country_code': 'BL' 1149 }, 1150 'SAINT_KITTS_AND_NEVIS': { 1151 'country_code': 'KN' 1152 }, 1153 'SAINT_LUCIA': { 1154 'country_code': 'LC' 1155 }, 1156 'SAINT_MARTIN': { 1157 'country_code': 'MF' 1158 }, 1159 'SAINT_PIERRE_AND_MIQUELON': { 1160 'country_code': 'PM' 1161 }, 1162 'SAINT_VINCENT_AND_THE_GRENADINES': { 1163 'country_code': 'VC' 1164 }, 1165 'SAMOA': { 1166 'country_code': 'WS' 1167 }, 1168 'SAN_MARINO': { 1169 'country_code': 'SM' 1170 }, 1171 'SAO_TOME_AND_PRINCIPE': { 1172 'country_code': 'ST' 1173 }, 1174 'SAUDI_ARABIA': { 1175 'country_code': 'SA' 1176 }, 1177 'SENEGAL': { 1178 'country_code': 'SN' 1179 }, 1180 'SERBIA': { 1181 'country_code': 'RS' 1182 }, 1183 'SEYCHELLES': { 1184 'country_code': 'SC' 1185 }, 1186 'SIERRA_LEONE': { 1187 'country_code': 'SL' 1188 }, 1189 'SINGAPORE': { 1190 'country_code': 'SG' 1191 }, 1192 'SINT_MAARTEN': { 1193 'country_code': 'SX' 1194 }, 1195 'SLOVAKIA': { 1196 'country_code': 'SK' 1197 }, 1198 'SLOVENIA': { 1199 'country_code': 'SI' 1200 }, 1201 'SOLOMON_ISLANDS': { 1202 'country_code': 'SB' 1203 }, 1204 'SOMALIA': { 1205 'country_code': 'SO' 1206 }, 1207 'SOUTH_AFRICA': { 1208 'country_code': 'ZA' 1209 }, 1210 'SOUTH_GEORGIA': { 1211 'country_code': 'GS' 1212 }, 1213 'SOUTH_SUDAN': { 1214 'country_code': 'SS' 1215 }, 1216 'SPAIN': { 1217 'country_code': 'ES' 1218 }, 1219 'SRI_LANKA': { 1220 'country_code': 'LK' 1221 }, 1222 'SUDAN': { 1223 'country_code': 'SD' 1224 }, 1225 'SURINAME': { 1226 'country_code': 'SR' 1227 }, 1228 'SVALBARD_AND_JAN_MAYEN': { 1229 'country_code': 'SJ' 1230 }, 1231 'SWAZILAND': { 1232 'country_code': 'SZ' 1233 }, 1234 'SWEDEN': { 1235 'country_code': 'SE' 1236 }, 1237 'SWITZERLAND': { 1238 'country_code': 'CH' 1239 }, 1240 'SYRIAN_ARAB_REPUBLIC': { 1241 'country_code': 'SY' 1242 }, 1243 'TAIWAN': { 1244 'country_code': 'TW' 1245 }, 1246 'TAJIKISTAN': { 1247 'country_code': 'TJ' 1248 }, 1249 'TANZANIA': { 1250 'country_code': 'TZ' 1251 }, 1252 'THAILAND': { 1253 'country_code': 'TH' 1254 }, 1255 'TIMOR-LESTE': { 1256 'country_code': 'TL' 1257 }, 1258 'TOGO': { 1259 'country_code': 'TG' 1260 }, 1261 'TOKELAU': { 1262 'country_code': 'TK' 1263 }, 1264 'TONGA': { 1265 'country_code': 'TO' 1266 }, 1267 'TRINIDAD_AND_TOBAGO': { 1268 'country_code': 'TT' 1269 }, 1270 'TUNISIA': { 1271 'country_code': 'TN' 1272 }, 1273 'TURKEY': { 1274 'country_code': 'TR' 1275 }, 1276 'TURKMENISTAN': { 1277 'country_code': 'TM' 1278 }, 1279 'TURKS_AND_CAICOS_ISLANDS': { 1280 'country_code': 'TC' 1281 }, 1282 'TUVALU': { 1283 'country_code': 'TV' 1284 }, 1285 'UGANDA': { 1286 'country_code': 'UG' 1287 }, 1288 'UKRAINE': { 1289 'country_code': 'UA' 1290 }, 1291 'UNITED_ARAB_EMIRATES': { 1292 'country_code': 'AE' 1293 }, 1294 'UNITED_KINGDOM': { 1295 'country_code': 'GB' 1296 }, 1297 'UNITED_STATES': { 1298 'country_code': 'US' 1299 }, 1300 'UNITED_STATES_MINOR_OUTLYING_ISLANDS': { 1301 'country_code': 'UM' 1302 }, 1303 'URUGUAY': { 1304 'country_code': 'UY' 1305 }, 1306 'UZBEKISTAN': { 1307 'country_code': 'UZ' 1308 }, 1309 'VANUATU': { 1310 'country_code': 'VU' 1311 }, 1312 'VENEZUELA': { 1313 'country_code': 'VE' 1314 }, 1315 'VIETNAM': { 1316 'country_code': 'VN' 1317 }, 1318 'VIRGIN_ISLANDS_BRITISH': { 1319 'country_code': 'VG' 1320 }, 1321 'VIRGIN_ISLANDS_US': { 1322 'country_code': 'VI' 1323 }, 1324 'WALLIS_AND_FUTUNA': { 1325 'country_code': 'WF' 1326 }, 1327 'WESTERN_SAHARA': { 1328 'country_code': 'EH' 1329 }, 1330 'YEMEN': { 1331 'country_code': 'YE' 1332 }, 1333 'ZAMBIA': { 1334 'country_code': 'ZM' 1335 }, 1336 'ZIMBABWE': { 1337 'country_code': 'ZW' 1338 }, 1339 'NON_COUNTRY': { 1340 'country_code': 'XX' 1341 } 1342} 1343 1344ALL_CHANNELS_2G = { 1345 1: {20, 40}, 1346 2: {20, 40}, 1347 3: {20, 40}, 1348 4: {20, 40}, 1349 5: {20, 40}, 1350 6: {20, 40}, 1351 7: {20, 40}, 1352 8: {20, 40}, 1353 9: {20, 40}, 1354 10: {20, 40}, 1355 11: {20, 40}, 1356 12: {20, 40}, 1357 13: {20, 40}, 1358 14: {20} 1359} 1360 1361ALL_CHANNELS_5G = { 1362 36: {20, 40, 80}, 1363 40: {20, 40, 80}, 1364 44: {20, 40, 80}, 1365 48: {20, 40, 80}, 1366 52: {20, 40, 80}, 1367 56: {20, 40, 80}, 1368 60: {20, 40, 80}, 1369 64: {20, 40, 80}, 1370 100: {20, 40, 80}, 1371 104: {20, 40, 80}, 1372 108: {20, 40, 80}, 1373 112: {20, 40, 80}, 1374 116: {20, 40, 80}, 1375 120: {20, 40, 80}, 1376 124: {20, 40, 80}, 1377 128: {20, 40, 80}, 1378 132: {20, 40, 80}, 1379 136: {20, 40, 80}, 1380 140: {20, 40, 80}, 1381 144: {20, 40, 80}, 1382 149: {20, 40, 80}, 1383 153: {20, 40, 80}, 1384 157: {20, 40, 80}, 1385 161: {20, 40, 80}, 1386 165: {20} 1387} 1388 1389ALL_CHANNELS = {**ALL_CHANNELS_2G, **ALL_CHANNELS_5G} 1390