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