blob: f773db94113754e1d113ab74a74fc0b3daaa9cc3 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam842dad02014-02-18 18:44:02 -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.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080020 */
Kiet Lam842dad02014-02-18 18:44:02 -080021
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080022/*
Kiet Lam842dad02014-02-18 18:44:02 -080023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28/*
29 *
Jeff Johnson295189b2012-06-20 16:38:30 -070030 * Author: Kevin Nguyen
31 * Date: 04/09/02
32 * History:-
33 * 04/09/02 Created.
34 * --------------------------------------------------------------------
35 *
36 */
37
38#ifndef __CFGAPI_H
39#define __CFGAPI_H
40
41#include <sirCommon.h>
42#include <sirParams.h>
43#include <sirMacProtDef.h>
44#include <wniApi.h>
45#include <aniGlobal.h>
46
47
48/*---------------------------------------------------------------------*/
49/* CFG definitions */
50/*---------------------------------------------------------------------*/
51#define CFG_TYPE_STR 0x0000000
52#define CFG_TYPE_INT 0x0000001
53#define CFG_HOST_RE 0x0000002
54#define CFG_HOST_WE 0x0000004
55
56// CFG status
57typedef enum eCfgStatusTypes {
58 CFG_INCOMPLETE,
59 CFG_SUCCESS,
60 CFG_FAILURE
61} tCfgStatusTypes;
62
63// WEP key mapping table row structure
64typedef struct
65{
66 tANI_U8 keyMappingAddr[SIR_MAC_ADDR_LENGTH];
67 tANI_U32 wepOn;
68 tANI_U8 key[SIR_MAC_KEY_LENGTH];
69 tANI_U32 status;
70} tCfgWepKeyEntry;
71
72
73/*---------------------------------------------------------------------*/
74/* CFG function prototypes */
75/*---------------------------------------------------------------------*/
76
77tANI_U32 cfgNeedRestart(tpAniSirGlobal pMac, tANI_U16 cfgId) ;
78tANI_U32 cfgNeedReload(tpAniSirGlobal pMac, tANI_U16 cfgId) ;
79
80/// CFG initialization function
81void wlan_cfgInit(tpAniSirGlobal);
82
83/// Process host message
84void cfgProcessMbMsg(tpAniSirGlobal, tSirMbMsg*);
85
86/// Set integer parameter value
87tSirRetStatus cfgSetInt(tpAniSirGlobal, tANI_U16, tANI_U32);
88
89/// Check if the parameter is valid
90tSirRetStatus cfgCheckValid(tpAniSirGlobal, tANI_U16);
91
92/// Get integer parameter value
93tSirRetStatus wlan_cfgGetInt(tpAniSirGlobal, tANI_U16, tANI_U32*);
94
95/// Increment integer parameter
96tSirRetStatus cfgIncrementInt(tpAniSirGlobal, tANI_U16, tANI_U32);
97
98/// Set string parameter value
99tSirRetStatus cfgSetStr(tpAniSirGlobal, tANI_U16, tANI_U8*, tANI_U32);
100
101tSirRetStatus cfgSetStrNotify(tpAniSirGlobal, tANI_U16, tANI_U8*, tANI_U32, int);
102
103//Cfg Download function for Prima or Integrated solutions.
104void processCfgDownloadReq(tpAniSirGlobal, tANI_U16, tANI_U32*);
105
106/// Get string parameter value
107tSirRetStatus wlan_cfgGetStr(tpAniSirGlobal, tANI_U16, tANI_U8*, tANI_U32*);
108
109/// Get string parameter maximum length
110tSirRetStatus wlan_cfgGetStrMaxLen(tpAniSirGlobal, tANI_U16, tANI_U32*);
111
112/// Get string parameter maximum length
113tSirRetStatus wlan_cfgGetStrLen(tpAniSirGlobal, tANI_U16, tANI_U32*);
114
115/// Get the regulatory tx power on given channel
116tPowerdBm cfgGetRegulatoryMaxTransmitPower(tpAniSirGlobal pMac, tANI_U8 channel);
117
118/// Dump CFG data to memory
119void cfgDump(tANI_U32*);
120
121/// Save parameters with P flag set
122void cfgSave(void);
123
124/// Get capability info
125extern tSirRetStatus cfgGetCapabilityInfo(tpAniSirGlobal pMac, tANI_U16 *pCap,tpPESession psessionEntry);
126
127/// Set capability info
128extern void cfgSetCapabilityInfo(tpAniSirGlobal, tANI_U16);
129
130/// Cleanup CFG module
131void cfgCleanup(tpAniSirGlobal pMac);
132
133extern tANI_U8 *gCfgParamName[];
134
135#endif /* __CFGAPI_H */
136
137
138
139