This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwifi_hal_sta.h
149 lines (127 loc) · 3.56 KB
/
wifi_hal_sta.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2016 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __WIFI_HAL_STA_H__
#define __WIFI_HAL_STA_H__
#ifdef __cplusplus
extern "C"{
#endif
/**
* @addtogroup WIFI_HAL_TYPES
* @{
*/
typedef struct {
} wifi_sta_capability_t;
typedef struct {
UINT vap_index;
wifi_connection_status_t connect_status;
UINT channel;
UINT channelWidth;
UINT op_class;
} wifi_station_stats_t;
/**
* @addtogroup WIFI_HAL_APIS
* @{
*/
/* wifi_connect() function */
/**
* Description: To connect the client VAP to specified BSS
* Parameters :
* ap_index - VAP index
* wifi_bss_info_t - Information about BSS that client will connect to
*
* @return status of the operation
* return RETURN_OK - on success
* return RETURN_ERR - on failure
*
* @execution Synchronous.
* @sideeffect None.
*
*/
INT wifi_connect(INT ap_index, wifi_bss_info_t *bss);
/* wifi_disconnect() function */
/**
* Description: To disconnect client
* Parameters :
* ap_index - index of client VAP
*
* @return status of the operation
* return RETURN_OK - on success
* return RETURN_ERR - on failure
*
* @execution Synchronous.
* @sideeffect None.
*
*/
INT wifi_disconnect(INT ap_index);
/* wifi_getClientCapability() function */
/**
* Description: To get client
* Parameters :
* ap_index - index of client VAP
* capability - wifi_client_capabilities_t structure
*
* @return status of the operation
* return RETURN_OK - on success
* return RETURN_ERR - on failure
*
* @execution Synchronous.
* @sideeffect None.
*
*/
INT wifi_getStationCapability(INT ap_index, wifi_sta_capability_t *cap);
/* wifi_findNetworks() function */
/**
* Description: To get client
* Parameters :
* ap_index - index of client VAP
* channel - channel number and band information
* bss - array of wifi_bss_info_t structure allocated by HAL layer and to be freed by caller
* num_bss - number in array
*
* @return status of the operation
* return RETURN_OK - on success
* return RETURN_ERR - on failure
*
* @execution Synchronous.
* @sideeffect None.
*
*/
INT wifi_findNetworks(INT ap_index, wifi_channel_t *channel, wifi_bss_info_t **bss, UINT *num_bss);
/* wifi_getStationStats() function */
/**
* Description: Return the station stats
* Parameters :
* ap_index - index of client VAP
* sta - station stats
*
* @return status of the operation
* return RETURN_OK - on success
* return RETURN_ERR - on failure
*
* @execution Synchronous.
* @sideeffect None.
*
*/
INT wifi_getStationStats(INT ap_index, wifi_station_stats_t *sta);
typedef INT ( * wifi_staConnectionStatus_callback)(INT apIndex, wifi_bss_info_t *bss_dev, wifi_station_stats_t *sta);
void wifi_staConnectionStatus_callback_register(wifi_staConnectionStatus_callback callback_proc);
#ifdef __cplusplus
}
#endif
#endif