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