rtw_rson.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. #define RTW_RSON_VER 1
  23. #define RTW_RSON_SCORE_NOTSUP 0x0
  24. #define RTW_RSON_SCORE_NOTCNNT 0x1
  25. #define RTW_RSON_SCORE_MAX 0xFF
  26. #define RTW_RSON_HC_NOTREADY 0xFF
  27. #define RTW_RSON_HC_ROOT 0x0
  28. #define RTW_RSON_ALLOWCONNECT 0x1
  29. #define RTW_RSON_DENYCONNECT 0x0
  30. /* for rtw self-origanization spec 1 */
  31. struct rtw_rson_struct {
  32. u8 ver;
  33. u32 id;
  34. u8 hopcnt;
  35. u8 connectible;
  36. u8 loading;
  37. u8 res[16];
  38. } __attribute__((__packed__));
  39. void init_rtw_rson_data(struct dvobj_priv *dvobj);
  40. void rtw_rson_get_property_str(_adapter *padapter, char *rson_data_str);
  41. int rtw_rson_set_property(_adapter *padapter, char *field, char *value);
  42. int rtw_rson_choose(struct wlan_network **candidate, struct wlan_network *competitor);
  43. int rtw_get_rson_struct(WLAN_BSSID_EX *bssid, struct rtw_rson_struct *rson_data);
  44. u8 rtw_cal_rson_score(struct rtw_rson_struct *cand_rson_data, NDIS_802_11_RSSI Rssi);
  45. void rtw_rson_handle_ie(WLAN_BSSID_EX *bssid, u8 ie_offset);
  46. u32 rtw_rson_append_ie(_adapter *padapter, unsigned char *pframe, u32 *len);
  47. void rtw_rson_do_disconnect(_adapter *padapter);
  48. void rtw_rson_join_done(_adapter *padapter);
  49. int rtw_rson_isupdate_roamcan(struct mlme_priv *mlme, struct wlan_network **candidate, struct wlan_network *competitor);
  50. void rtw_rson_show_survey_info(struct seq_file *m, _list *plist, _list *phead);
  51. u8 rtw_rson_ap_check_sta(_adapter *padapter, u8 *pframe, uint pkt_len, unsigned short ie_offset);
  52. u8 rtw_rson_scan_wk_cmd(_adapter *padapter, int op);
  53. void rtw_rson_scan_cmd_hdl(_adapter *padapter, int op);
  54. #endif /* __RTW_RSON_H_ */