Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
drivers
staging
winbond
sme_api.h
Go to the documentation of this file.
1
/*
2
* sme_api.h
3
*
4
* Copyright(C) 2002 Winbond Electronics Corp.
5
*/
6
7
#ifndef __SME_API_H__
8
#define __SME_API_H__
9
10
#include <linux/types.h>
11
12
#include "
localpara.h
"
13
14
/****************** CONSTANT AND MACRO SECTION ******************************/
15
16
#define MEDIA_STATE_DISCONNECTED 0
17
#define MEDIA_STATE_CONNECTED 1
18
19
/* ARRAY CHECK */
20
#define MAX_POWER_TO_DB 32
21
22
/****************** TYPE DEFINITION SECTION *********************************/
23
24
/****************** EXPORTED FUNCTION DECLARATION SECTION *******************/
25
26
/* OID_802_11_BSSID */
27
s8
sme_get_bssid
(
void
*pcore_data,
u8
*pbssid);
28
s8
sme_get_desired_bssid
(
void
*pcore_data,
u8
*pbssid);
/* Unused */
29
s8
sme_set_desired_bssid
(
void
*pcore_data,
u8
*pbssid);
30
31
/* OID_802_11_SSID */
32
s8
sme_get_ssid
(
void
*pcore_data,
u8
*pssid,
u8
*pssid_len);
33
s8
sme_get_desired_ssid
(
void
*pcore_data,
u8
*pssid,
u8
*pssid_len);
/* Unused */
34
s8
sme_set_desired_ssid
(
void
*pcore_data,
u8
*pssid,
u8
ssid_len);
35
36
/* OID_802_11_INFRASTRUCTURE_MODE */
37
s8
sme_get_bss_type
(
void
*pcore_data,
u8
*pbss_type);
38
s8
sme_get_desired_bss_type
(
void
*pcore_data,
u8
*pbss_type);
/* Unused */
39
s8
sme_set_desired_bss_type
(
void
*pcore_data,
u8
bss_type);
40
41
/* OID_802_11_FRAGMENTATION_THRESHOLD */
42
s8
sme_get_fragment_threshold
(
void
*pcore_data,
u32
*pthreshold);
43
s8
sme_set_fragment_threshold
(
void
*pcore_data,
u32
threshold
);
44
45
/* OID_802_11_RTS_THRESHOLD */
46
s8
sme_get_rts_threshold
(
void
*pcore_data,
u32
*pthreshold);
47
s8
sme_set_rts_threshold
(
void
*pcore_data,
u32
threshold
);
48
49
/* OID_802_11_CONFIGURATION */
50
s8
sme_get_beacon_period
(
void
*pcore_data,
u16
*pbeacon_period);
51
s8
sme_set_beacon_period
(
void
*pcore_data,
u16
beacon_period);
52
53
s8
sme_get_atim_window
(
void
*pcore_data,
u16
*patim_window);
54
s8
sme_set_atim_window
(
void
*pcore_data,
u16
atim_window);
55
56
s8
sme_get_current_channel
(
void
*pcore_data,
u8
*pcurrent_channel);
57
s8
sme_get_current_band
(
void
*pcore_data,
u8
*pcurrent_band);
58
s8
sme_set_current_channel
(
void
*pcore_data,
u8
current_channel);
59
60
/* OID_802_11_BSSID_LIST */
61
s8
sme_get_scan_bss_count
(
void
*pcore_data,
u8
*pcount);
62
s8
sme_get_scan_bss
(
void
*pcore_data,
u8
index
,
void
**ppbss);
63
64
s8
sme_get_connected_bss
(
void
*pcore_data,
void
**ppbss_now);
65
66
/* OID_802_11_AUTHENTICATION_MODE */
67
s8
sme_get_auth_mode
(
void
*pcore_data,
u8
*pauth_mode);
68
s8
sme_set_auth_mode
(
void
*pcore_data,
u8
auth_mode
);
69
70
/* OID_802_11_WEP_STATUS / OID_802_11_ENCRYPTION_STATUS */
71
s8
sme_get_wep_mode
(
void
*pcore_data,
u8
*pwep_mode);
72
s8
sme_set_wep_mode
(
void
*pcore_data,
u8
wep_mode);
73
74
/* OID_GEN_VENDOR_ID */
75
/* OID_802_3_PERMANENT_ADDRESS */
76
s8
sme_get_permanent_mac_addr
(
void
*pcore_data,
u8
*pmac_addr);
77
78
/* OID_802_3_CURRENT_ADDRESS */
79
s8
sme_get_current_mac_addr
(
void
*pcore_data,
u8
*pmac_addr);
80
81
/* OID_802_11_NETWORK_TYPE_IN_USE */
82
s8
sme_get_network_type_in_use
(
void
*pcore_data,
u8
*ptype);
83
s8
sme_set_network_type_in_use
(
void
*pcore_data,
u8
type
);
84
85
/* OID_802_11_SUPPORTED_RATES */
86
s8
sme_get_supported_rate
(
void
*pcore_data,
u8
*prates);
87
88
/* OID_802_11_ADD_WEP */
89
s8
sme_set_add_wep
(
void
*pcore_data,
u32
key_index
,
u32
key_len
,
90
u8
*
Address
,
u8
*
key
);
91
92
/* OID_802_11_REMOVE_WEP */
93
s8
sme_set_remove_wep
(
void
*pcre_data,
u32
key_index
);
94
95
/* OID_802_11_DISASSOCIATE */
96
s8
sme_set_disassociate
(
void
*pcore_data);
97
98
/* OID_802_11_POWER_MODE */
99
s8
sme_get_power_mode
(
void
*pcore_data,
u8
*pmode);
100
s8
sme_set_power_mode
(
void
*pcore_data,
u8
mode
);
101
102
/* OID_802_11_BSSID_LIST_SCAN */
103
s8
sme_set_bssid_list_scan
(
void
*pcore_data,
void
*pscan_para);
104
105
/* OID_802_11_RELOAD_DEFAULTS */
106
s8
sme_set_reload_defaults
(
void
*pcore_data,
u8
reload_type);
107
108
109
/*------------------------- non-standard ----------------------------------*/
110
s8
sme_get_connect_status
(
void
*pcore_data,
u8
*pstatus);
111
/*--------------------------------------------------------------------------*/
112
113
void
sme_get_encryption_status
(
void
*pcore_data,
u8
*EncryptStatus);
114
void
sme_set_encryption_status
(
void
*pcore_data,
u8
EncryptStatus);
115
s8
sme_add_key
(
void
*pcore_data,
116
u32
key_index
,
117
u8
key_len
,
118
u8
key_type,
119
u8
*key_bssid,
120
u8
*ptx_tsc,
121
u8
*prx_tsc,
122
u8
*key_material);
123
void
sme_remove_default_key
(
void
*pcore_data,
int
index
);
124
void
sme_remove_mapping_key
(
void
*pcore_data,
u8
*pmac_addr);
125
void
sme_clear_all_mapping_key
(
void
*pcore_data);
126
void
sme_clear_all_default_key
(
void
*pcore_data);
127
128
129
130
s8
sme_set_preamble_mode
(
void
*pcore_data,
u8
mode
);
131
s8
sme_get_preamble_mode
(
void
*pcore_data,
u8
*
mode
);
132
s8
sme_get_preamble_type
(
void
*pcore_data,
u8
*
type
);
133
s8
sme_set_slottime_mode
(
void
*pcore_data,
u8
mode
);
134
s8
sme_get_slottime_mode
(
void
*pcore_data,
u8
*
mode
);
135
s8
sme_get_slottime_type
(
void
*pcore_data,
u8
*
type
);
136
s8
sme_set_txrate_policy
(
void
*pcore_data,
u8
policy);
137
s8
sme_get_txrate_policy
(
void
*pcore_data,
u8
*policy);
138
s8
sme_get_cwmin_value
(
void
*pcore_data,
u8
*cwmin);
139
s8
sme_get_cwmax_value
(
void
*pcore_data,
u16
*cwmax);
140
s8
sme_get_ms_radio_mode
(
void
*pcore_data,
u8
*pMsRadioOff);
141
s8
sme_set_ms_radio_mode
(
void
*pcore_data,
u8
boMsRadioOff);
142
143
void
sme_get_tx_power_level
(
void
*pcore_data,
u32
*TxPower);
144
u8
sme_set_tx_power_level
(
void
*pcore_data,
u32
TxPower);
145
void
sme_get_antenna_count
(
void
*pcore_data,
u32
*AntennaCount);
146
void
sme_get_rx_antenna
(
void
*pcore_data,
u32
*RxAntenna);
147
u8
sme_set_rx_antenna
(
void
*pcore_data,
u32
RxAntenna);
148
void
sme_get_tx_antenna
(
void
*pcore_data,
u32
*TxAntenna);
149
s8
sme_set_tx_antenna
(
void
*pcore_data,
u32
TxAntenna);
150
s8
sme_set_IBSS_chan
(
void
*pcore_data,
struct
chan_info
chan
);
151
s8
sme_set_IE_append
(
void
*pcore_data,
u8
*
buffer
,
u16
buf_len);
152
153
/* ================== Local functions ====================== */
154
static
const
u32
PowerDbToMw[] = {
155
56,
/* mW, MAX - 0, 17.5 dbm */
156
40,
/* mW, MAX - 1, 16.0 dbm */
157
30,
/* mW, MAX - 2, 14.8 dbm */
158
20,
/* mW, MAX - 3, 13.0 dbm */
159
15,
/* mW, MAX - 4, 11.8 dbm */
160
12,
/* mW, MAX - 5, 10.6 dbm */
161
9,
/* mW, MAX - 6, 9.4 dbm */
162
7,
/* mW, MAX - 7, 8.3 dbm */
163
5,
/* mW, MAX - 8, 6.4 dbm */
164
4,
/* mW, MAX - 9, 5.3 dbm */
165
3,
/* mW, MAX - 10, 4.0 dbm */
166
2,
/* mW, MAX - 11, ? dbm */
167
2,
/* mW, MAX - 12, ? dbm */
168
2,
/* mW, MAX - 13, ? dbm */
169
2,
/* mW, MAX - 14, ? dbm */
170
2,
/* mW, MAX - 15, ? dbm */
171
2,
/* mW, MAX - 16, ? dbm */
172
2,
/* mW, MAX - 17, ? dbm */
173
2,
/* mW, MAX - 18, ? dbm */
174
1,
/* mW, MAX - 19, ? dbm */
175
1,
/* mW, MAX - 20, ? dbm */
176
1,
/* mW, MAX - 21, ? dbm */
177
1,
/* mW, MAX - 22, ? dbm */
178
1,
/* mW, MAX - 23, ? dbm */
179
1,
/* mW, MAX - 24, ? dbm */
180
1,
/* mW, MAX - 25, ? dbm */
181
1,
/* mW, MAX - 26, ? dbm */
182
1,
/* mW, MAX - 27, ? dbm */
183
1,
/* mW, MAX - 28, ? dbm */
184
1,
/* mW, MAX - 29, ? dbm */
185
1,
/* mW, MAX - 30, ? dbm */
186
1
/* mW, MAX - 31, ? dbm */
187
};
188
189
#endif
/* __SME_API_H__ */
190
191
Generated on Thu Jan 10 2013 14:32:41 for Linux Kernel by
1.8.2