1/** \file regulatoryDomain.h 2 * \brief regulatoryDomain module internal header file 3 * 4 * \see regulatoryDomain.c 5 */ 6/**************************************************************************** 7**+-----------------------------------------------------------------------+** 8**| |** 9**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** 10**| All rights reserved. |** 11**| |** 12**| Redistribution and use in source and binary forms, with or without |** 13**| modification, are permitted provided that the following conditions |** 14**| are met: |** 15**| |** 16**| * Redistributions of source code must retain the above copyright |** 17**| notice, this list of conditions and the following disclaimer. |** 18**| * Redistributions in binary form must reproduce the above copyright |** 19**| notice, this list of conditions and the following disclaimer in |** 20**| the documentation and/or other materials provided with the |** 21**| distribution. |** 22**| * Neither the name Texas Instruments nor the names of its |** 23**| contributors may be used to endorse or promote products derived |** 24**| from this software without specific prior written permission. |** 25**| |** 26**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** 27**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** 28**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** 29**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** 30**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** 31**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** 32**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** 33**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** 34**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** 35**| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |** 36**| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |** 37**| |** 38**+-----------------------------------------------------------------------+** 39****************************************************************************/ 40 41/***************************************************************************/ 42/* */ 43/* MODULE: regulatoryDomain.h */ 44/* PURPOSE: regulatoryDomain module internal header file */ 45/* */ 46/***************************************************************************/ 47#ifndef __REGULATORY_DOMAIN_H__ 48#define __REGULATORY_DOMAIN_H__ 49 50#include "paramOut.h" 51#include "fsm.h" 52#include "802_11Defs.h" 53#include "whalCtrl_api.h" 54#include "regulatoryDomainApi.h" 55 56#define BG_24G_BAND_CHANNEL_HOPS 1 57#define BG_24G_BAND_MIN_CHANNEL 1 58 59#define A_5G_BAND_CHANNEL_HOPS 4 60 61#define A_5G_BAND_MIN_MIDDLE_BAND_DFS_CHANNEL 52 62#define A_5G_BAND_MAX_MIDDLE_BAND_DFS_CHANNEL 64 63#define A_5G_BAND_MIN_UPPER_BAND_DFS_CHANNEL 100 64#define A_5G_BAND_MAX_UPPER_BAND_DFS_CHANNEL 140 65 66typedef struct 67{ 68 BOOL channelValidityPassive; /*TRUE-valid, FALSE-invalid */ 69 BOOL channelValidityActive; /*TRUE-valid, FALSE-invalid */ 70 BOOL bChanneInCountryIe; 71 72 UINT8 uMaxTxPowerDomain; /* 73 * Holds ONLY the default limitation (Application) 74 * or according to 11d country code IE 75 * Updated on init phase or upon receiving new country code IE 76 */ 77 UINT32 timestamp; 78} channelCapability_t; 79 80 81typedef struct 82{ 83 /* Variables read from registry */ 84 /********************************/ 85 /* 802.11h enabled or disabled */ 86 BOOL spectrumManagementEnabled; 87 /* 802.11d enabled or disabled */ 88 BOOL regulatoryDomainEnabled; 89 /* scan availability channels from registry */ 90 scanControlTable_t scanControlTable; 91 /* Desired Temp Tx Power */ 92 UINT8 uDesiredTemporaryTxPower; 93 /* Actual Temp Tx Power */ 94 UINT8 uTemporaryTxPower; 95 96 /* User configuration for max Tx power */ 97 UINT8 uUserMaxTxPower; 98 /* The TX power level translation from NVS */ 99 powerLevelTableInterrogate_t tPowerLevelTableInterrogate; 100 101 /* Min and Max values of Dbm retrieved from power level table and used for 11h assoc request */ 102 UINT8 uMinPowerDbm; 103 UINT8 uMaxPowerDbm; 104 /* Internal reg domain variables */ 105 /********************************/ 106 107 /* Power Constraint IE 32 in DBM/10, valid only when 802.11h is enabled */ 108 UINT8 uPowerConstraint; 109 /* External TX Power Control in DBM/10, valid only when 802.11h is disabled */ 110 UINT8 uExternTxPowerPreferred; 111 112 UINT8 minDFS_channelNum; 113 UINT8 maxDFS_channelNum; 114 115 country_t country24; /* Detected County IE for 2.4 Ghz */ 116 country_t country5; /* Detected County IE for 5 Ghz */ 117 BOOL country_2_4_WasFound; 118 BOOL country_5_WasFound; 119 UINT32 uLastCountryReceivedTS; 120 UINT32 uTimeOutToResetCountryMs; 121 channelCapability_t supportedChannels_band_5[A_5G_BAND_NUM_CHANNELS]; 122 channelCapability_t supportedChannels_band_2_4[NUM_OF_CHANNELS_24]; 123 124 /* set the size of the array to max of B_G & A, so that the array doesnt overflow. +3 for word alignment */ 125 UINT8 pDefaultChannels[A_5G_BAND_NUM_CHANNELS+3]; 126 /* merge 4.02/4.03 evaluate the +3 above and adjust or hSiteMgr and below will be 127 will be unaligned accesses. Expect it might now be +1 since 2 UINT8 variable 128 have been added in 4.03 (max and min DFS_channelNum above) */ 129 130 131 /* Handles to other objects */ 132 TI_HANDLE hSiteMgr; 133 TI_HANDLE hHalCtrl; 134 TI_HANDLE hSwitchChannel; 135 TI_HANDLE hReport; 136 TI_HANDLE hOs; 137 138 139} regulatoryDomain_t; 140 141 142 143 144 145#endif /* __REGULATORY_DOMAIN_H__*/ 146