• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  *
19  ******************************************************************************/
20 #ifndef __RTW_RSON_H_
21 #define __RTW_RSON_H_
22 
23 
24 #define RTW_RSON_VER						1
25 
26 #define RTW_RSON_SCORE_NOTSUP			0x0
27 #define RTW_RSON_SCORE_NOTCNNT			0x1
28 #define RTW_RSON_SCORE_MAX				0xFF
29 #define RTW_RSON_HC_NOTREADY			0xFF
30 #define RTW_RSON_HC_ROOT				0x0
31 #define RTW_RSON_ALLOWCONNECT			0x1
32 #define RTW_RSON_DENYCONNECT			0x0
33 
34 
35 
36 /*	for rtw self-origanization spec 1	*/
37 struct rtw_rson_struct {
38 	u8 ver;
39 	u32 id;
40 	u8 hopcnt;
41 	u8 connectible;
42 	u8 loading;
43 	u8 res[16];
44 } __attribute__((__packed__));
45 
46 void init_rtw_rson_data(struct dvobj_priv *dvobj);
47 void rtw_rson_get_property_str(_adapter *padapter, char *rson_data_str);
48 int rtw_rson_set_property(_adapter *padapter, char *field, char *value);
49 int rtw_rson_choose(struct wlan_network **candidate, struct wlan_network *competitor);
50 int rtw_get_rson_struct(WLAN_BSSID_EX *bssid, struct  rtw_rson_struct *rson_data);
51 u8 rtw_cal_rson_score(struct rtw_rson_struct *cand_rson_data, NDIS_802_11_RSSI  Rssi);
52 void rtw_rson_handle_ie(WLAN_BSSID_EX *bssid, u8 ie_offset);
53 u32 rtw_rson_append_ie(_adapter *padapter, unsigned char *pframe, u32 *len);
54 void rtw_rson_do_disconnect(_adapter *padapter);
55 void rtw_rson_join_done(_adapter *padapter);
56 int rtw_rson_isupdate_roamcan(struct mlme_priv *mlme, struct wlan_network **candidate, struct wlan_network *competitor);
57 void rtw_rson_show_survey_info(struct seq_file *m, _list *plist, _list *phead);
58 u8 rtw_rson_ap_check_sta(_adapter *padapter, u8 *pframe, uint pkt_len, unsigned short ie_offset);
59 u8 rtw_rson_scan_wk_cmd(_adapter *padapter, int op);
60 void rtw_rson_scan_cmd_hdl(_adapter *padapter, int op);
61 #endif /* __RTW_RSON_H_ */
62