blob: e1f40a8883089d4ef4d009105f0b1955056217e3 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Prakash Dhavali2e9ffc82014-02-19 21:16:20 -08002 * Copyright (c) 2014 The Linux Foundation. All rights reserved.
AnjaneeDevi Kapparapu24b52ff2014-02-18 18:44:02 -08003 *
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 Nakkala9c070ad2013-01-08 21:16:34 -080020 */
AnjaneeDevi Kapparapu24b52ff2014-02-18 18:44:02 -080021
22/*
23 * 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
Jeff Johnson295189b2012-06-20 16:38:30 -070028#include "wlan_hdd_includes.h"
29
30
31static inline v_VOID_t mibGetDot11DesiredBssType( hdd_adapter_t *pAdapter, eMib_dot11DesiredBssType *pDot11DesiredBssType )
32{
33 *pDot11DesiredBssType = pAdapter->hdd_mib.mibDot11DesiredBssType;
34 return;
35}
36
37static inline VOS_STATUS mibSetDot11DesiredBssType( hdd_adapter_t *pAdapter, eMib_dot11DesiredBssType mibDot11DesiredBssType )
38{
39 pAdapter->hdd_mib.mibDot11DesiredBssType = mibDot11DesiredBssType;
40 return( VOS_STATUS_SUCCESS );
41}
42
43v_BOOL_t mibIsDot11DesiredBssTypeInfrastructure( hdd_adapter_t *pAdapter )
44{
45 eMib_dot11DesiredBssType mibDot11DesiredBssType;
46 mibGetDot11DesiredBssType( pAdapter, &mibDot11DesiredBssType );
47
48 return( eMib_dot11DesiredBssType_infrastructure == mibDot11DesiredBssType );
49}
50
51
52static inline v_BOOL_t mibIsDot11DesiredBssTypeIndependent( hdd_adapter_t *pAdapter )
53{
54 eMib_dot11DesiredBssType mibDot11DesiredBssType;
55 mibGetDot11DesiredBssType( pAdapter, &mibDot11DesiredBssType );
56
57 return( eMib_dot11DesiredBssType_independent == mibDot11DesiredBssType );
58}
59
60static inline v_VOID_t mibGetDot11IbssJoinOnly( hdd_adapter_t *pAdapter, v_BOOL_t *pdot11IbssJoinOnly )
61{
62 *pdot11IbssJoinOnly = pAdapter->hdd_mib.dot11IbssJoinOnly;
63 return;
64}
65
66static inline VOS_STATUS mibSetDot11IbssJoinOnly( hdd_adapter_t *pAdapter, v_BOOL_t dot11IbssJoinOnly )
67{
68 pAdapter->hdd_mib.dot11IbssJoinOnly = dot11IbssJoinOnly;
69 return( VOS_STATUS_SUCCESS );
70}
71
72static inline VOS_STATUS mibSetDot11NICPowerState( hdd_adapter_t *pAdapter, eMib_dot11NICPowerState *pMibDot11NICPowerState )
73{
74 VOS_STATUS status = VOS_STATUS_SUCCESS;
75
76 pAdapter->hdd_mib.mibDot11NICPowerState = *pMibDot11NICPowerState;
77
78 return( status );
79}
80
81static inline VOS_STATUS mibSetDot11NICPowerStateOff( hdd_adapter_t *pAdapter )
82{
83 eMib_dot11NICPowerState dot11NICPowerState = eMib_dot11NICPowerState_OFF;
84 return( mibSetDot11NICPowerState( pAdapter, &dot11NICPowerState ) );
85}
86
87static inline void mibGetDot11NICPowerState( hdd_adapter_t *pAdapter, eMib_dot11NICPowerState *pMibDot11NICPowerState )
88{
89 *pMibDot11NICPowerState = pAdapter->hdd_mib.mibDot11NICPowerState;
90
91 return;
92}
93
94static inline v_BOOL_t mibIsDot11NICPowerStateOn( hdd_adapter_t *pAdapter )
95{
96 eMib_dot11NICPowerState dot11NICPowerState;
97
98 mibGetDot11NICPowerState( pAdapter, &dot11NICPowerState );
99
100 return( eMib_dot11NICPowerState_ON == dot11NICPowerState );
101}
102
103static inline v_BOOL_t mibIsDot11NICPowerStateOff( hdd_adapter_t *pAdapter )
104{
105 return( !mibIsDot11NICPowerStateOn( pAdapter ) );
106}
107
108static inline VOS_STATUS mibSetDot11DesiredSsidList( hdd_adapter_t *pAdapter, sMib_dot11DesiredSsidList *pDot11DesiredSsidList )
109{
110 VOS_STATUS status = VOS_STATUS_SUCCESS;
111
112 if ( pDot11DesiredSsidList->cEntries > MIB_DOT11_DESIRED_SSID_LIST_MAX_COUNT )
113
114 pAdapter->hdd_mib.mibDot11DesiredSsidList = *pDot11DesiredSsidList ;
115
116 return( status );
117}
118
119static inline VOS_STATUS mibSetDot11DesiredBssidList( hdd_adapter_t *pAdapter, sMib_dot11DesiredBssidList *pDot11DesiredBssidList )
120{
121 pAdapter->hdd_mib.mibDot11DesiredBssidList = *pDot11DesiredBssidList;
122
123 return( VOS_STATUS_SUCCESS );
124}
125
126
127static inline v_VOID_t mibGetDot11DesiredBssidList( hdd_adapter_t *pAdapter, sMib_dot11DesiredBssidList *pMibDot11DesiredBssidList )
128{
129 *pMibDot11DesiredBssidList = pAdapter->hdd_mib.mibDot11DesiredBssidList;
130
131 return;
132}
133
134
135static inline v_VOID_t mibGetDot11DesiredSsidList( hdd_adapter_t *pAdapter, sMib_dot11DesiredSsidList *pMibDot11DesiredSsidList )
136{
137 *pMibDot11DesiredSsidList = pAdapter->hdd_mib.mibDot11DesiredSsidList;
138
139 return;
140}
141
142
143static inline VOS_STATUS mibSetDot11AutoConfigEnabled( hdd_adapter_t *pAdapter, eMib_dot11AutoConfigEnabled *pMibDot11AutoConfigEnabled )
144{
145 VOS_STATUS status = VOS_STATUS_SUCCESS;
146
147 pAdapter->hdd_mib.mibDot11AutoConfigEnabled = *pMibDot11AutoConfigEnabled;
148
149 return( status );
150}
151
152
153static inline v_VOID_t mibGetDot11AutoConfigEnabled( hdd_adapter_t *pAdapter, eMib_dot11AutoConfigEnabled *pMibDot11AutoConfigEnabled )
154{
155 *pMibDot11AutoConfigEnabled = pAdapter->hdd_mib.mibDot11AutoConfigEnabled;
156
157 return;
158}
159
160static inline VOS_STATUS mibSetDot11MacExcludeList( hdd_adapter_t *pAdapter, sMib_dot11MacExcludeList *pDot11MacExcludeList )
161{
162 pAdapter->hdd_mib.mibDot11MacExcludeList = *pDot11MacExcludeList;
163
164 return( VOS_STATUS_SUCCESS );
165}
166
167static inline VOS_STATUS mibGetDot11MacExcludeList( hdd_adapter_t *pAdapter, sMib_dot11MacExcludeList *pDot11MacExcludeList )
168{
169 *pDot11MacExcludeList = pAdapter->hdd_mib.mibDot11MacExcludeList;
170
171 return( VOS_STATUS_SUCCESS );
172}
173
174static inline void mibSetDefaultDot11MacExcludeList( hdd_adapter_t *pAdapter )
175{
176 pAdapter->hdd_mib.mibDot11MacExcludeList.cEntries = 0;
177}
178
179static inline VOS_STATUS mibSetDot11HardwarePHYState( hdd_adapter_t *pAdapter, eMib_dot11HardwarePHYState *pMibDot11HardwarePHYState )
180{
181 VOS_STATUS status = VOS_STATUS_SUCCESS;
182
183 pAdapter->hdd_mib.mibDot11HardwarePHYState = *pMibDot11HardwarePHYState;
184
185 return( status );
186}
187
188
189static inline void mibGetDot11HardwarePHYState( hdd_adapter_t *pAdapter, eMib_dot11HardwarePHYState *pMibDot11HardwarePHYState )
190{
191 *pMibDot11HardwarePHYState = pAdapter->hdd_mib.mibDot11HardwarePHYState;
192
193 return;
194}
195
196static inline void mibSetDefaultDot11PrivacyExemptionList( hdd_adapter_t *pAdapter )
197{
198 pAdapter->hdd_mib.mibDot11PrivacyExemptionList.cEntries = 0;
199}
200
201
202static inline void mibGetDot11PowerSavingLevel( hdd_adapter_t *pAdapter, eMib_dot11PowerSavingLevel *pMibDot11PowerSavingLevel )
203{
204 *pMibDot11PowerSavingLevel = pAdapter->hdd_mib.mibDot11PowerSavingLevel;
205
206 return;
207}
208
209
210static inline void mibGetDevicePowerState( hdd_adapter_t *pAdapter, eMib_DevicePowerState *pMibDevicePowerState )
211{
212 *pMibDevicePowerState = pAdapter->hdd_mib.mibDevicePowerState;
213
214 return;
215}
216
217