blob: 19c400a14f6bcc8f6b0c502f12048ff54f2d5387 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
42/*
43 *
44 * Airgo Networks, Inc proprietary. All rights reserved.
45 * Author: Kevin Nguyen
46 * Date: 04/09/02
47 * History:-
48 * 04/09/02 Created.
49 * --------------------------------------------------------------------
50 *
51 */
52
53#ifndef __CFGAPI_H
54#define __CFGAPI_H
55
56#include <sirCommon.h>
57#include <sirParams.h>
58#include <sirMacProtDef.h>
59#include <wniApi.h>
60#include <aniGlobal.h>
61
62
63/*---------------------------------------------------------------------*/
64/* CFG definitions */
65/*---------------------------------------------------------------------*/
66#define CFG_TYPE_STR 0x0000000
67#define CFG_TYPE_INT 0x0000001
68#define CFG_HOST_RE 0x0000002
69#define CFG_HOST_WE 0x0000004
70
71// CFG status
72typedef enum eCfgStatusTypes {
73 CFG_INCOMPLETE,
74 CFG_SUCCESS,
75 CFG_FAILURE
76} tCfgStatusTypes;
77
78// WEP key mapping table row structure
79typedef struct
80{
81 tANI_U8 keyMappingAddr[SIR_MAC_ADDR_LENGTH];
82 tANI_U32 wepOn;
83 tANI_U8 key[SIR_MAC_KEY_LENGTH];
84 tANI_U32 status;
85} tCfgWepKeyEntry;
86
87
88/*---------------------------------------------------------------------*/
89/* CFG function prototypes */
90/*---------------------------------------------------------------------*/
91
92tANI_U32 cfgNeedRestart(tpAniSirGlobal pMac, tANI_U16 cfgId) ;
93tANI_U32 cfgNeedReload(tpAniSirGlobal pMac, tANI_U16 cfgId) ;
94
95/// CFG initialization function
96void wlan_cfgInit(tpAniSirGlobal);
97
98/// Process host message
99void cfgProcessMbMsg(tpAniSirGlobal, tSirMbMsg*);
100
101/// Set integer parameter value
102tSirRetStatus cfgSetInt(tpAniSirGlobal, tANI_U16, tANI_U32);
103
104/// Check if the parameter is valid
105tSirRetStatus cfgCheckValid(tpAniSirGlobal, tANI_U16);
106
107/// Get integer parameter value
108tSirRetStatus wlan_cfgGetInt(tpAniSirGlobal, tANI_U16, tANI_U32*);
109
110/// Increment integer parameter
111tSirRetStatus cfgIncrementInt(tpAniSirGlobal, tANI_U16, tANI_U32);
112
113/// Set string parameter value
114tSirRetStatus cfgSetStr(tpAniSirGlobal, tANI_U16, tANI_U8*, tANI_U32);
115
116tSirRetStatus cfgSetStrNotify(tpAniSirGlobal, tANI_U16, tANI_U8*, tANI_U32, int);
117
118//Cfg Download function for Prima or Integrated solutions.
119void processCfgDownloadReq(tpAniSirGlobal, tANI_U16, tANI_U32*);
120
121/// Get string parameter value
122tSirRetStatus wlan_cfgGetStr(tpAniSirGlobal, tANI_U16, tANI_U8*, tANI_U32*);
123
124/// Get string parameter maximum length
125tSirRetStatus wlan_cfgGetStrMaxLen(tpAniSirGlobal, tANI_U16, tANI_U32*);
126
127/// Get string parameter maximum length
128tSirRetStatus wlan_cfgGetStrLen(tpAniSirGlobal, tANI_U16, tANI_U32*);
129
130/// Get the regulatory tx power on given channel
131tPowerdBm cfgGetRegulatoryMaxTransmitPower(tpAniSirGlobal pMac, tANI_U8 channel);
132
133/// Dump CFG data to memory
134void cfgDump(tANI_U32*);
135
136/// Save parameters with P flag set
137void cfgSave(void);
138
139/// Get capability info
140extern tSirRetStatus cfgGetCapabilityInfo(tpAniSirGlobal pMac, tANI_U16 *pCap,tpPESession psessionEntry);
141
142/// Set capability info
143extern void cfgSetCapabilityInfo(tpAniSirGlobal, tANI_U16);
144
145/// Cleanup CFG module
146void cfgCleanup(tpAniSirGlobal pMac);
147
148extern tANI_U8 *gCfgParamName[];
149
150#endif /* __CFGAPI_H */
151
152
153
154