net: wireless: rockchip_wlan: add rtl8723bs support
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723bs / include / rtw_ap.h
1 /******************************************************************************\r
2  *\r
3  * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.\r
4  *                                        \r
5  * This program is free software; you can redistribute it and/or modify it\r
6  * under the terms of version 2 of the GNU General Public License as\r
7  * published by the Free Software Foundation.\r
8  *\r
9  * This program is distributed in the hope that it will be useful, but WITHOUT\r
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\r
12  * more details.\r
13  *\r
14  * You should have received a copy of the GNU General Public License along with\r
15  * this program; if not, write to the Free Software Foundation, Inc.,\r
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA\r
17  *\r
18  *\r
19  ******************************************************************************/\r
20 #ifndef __RTW_AP_H_\r
21 #define __RTW_AP_H_\r
22 \r
23 \r
24 #ifdef CONFIG_AP_MODE\r
25 \r
26 //external function\r
27 extern void rtw_indicate_sta_assoc_event(_adapter *padapter, struct sta_info *psta);\r
28 extern void rtw_indicate_sta_disassoc_event(_adapter *padapter, struct sta_info *psta);\r
29 \r
30 \r
31 void init_mlme_ap_info(_adapter *padapter);\r
32 void free_mlme_ap_info(_adapter *padapter);\r
33 //void update_BCNTIM(_adapter *padapter);\r
34 void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *data, u8 len);\r
35 void rtw_remove_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index);\r
36 void _update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx, const char *tag);\r
37 #define update_beacon(adapter, ie_id, oui, tx) _update_beacon((adapter), (ie_id), (oui), (tx), __func__)\r
38 void add_RATid(_adapter *padapter, struct sta_info *psta, u8 rssi_level);\r
39 void expire_timeout_chk(_adapter *padapter);\r
40 void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta);\r
41 void rtw_start_bss_hdl_after_chbw_decided(_adapter *adapter);\r
42 void start_bss_network(_adapter *padapter, struct createbss_parm *parm);\r
43 int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf,  int len);\r
44 void rtw_ap_restore_network(_adapter *padapter);\r
45 void rtw_set_macaddr_acl(_adapter *padapter, int mode);\r
46 int rtw_acl_add_sta(_adapter *padapter, u8 *addr);\r
47 int rtw_acl_remove_sta(_adapter *padapter, u8 *addr);\r
48 \r
49 u8 rtw_ap_set_pairwise_key(_adapter *padapter, struct sta_info *psta);\r
50 int rtw_ap_set_group_key(_adapter *padapter, u8 *key, u8 alg, int keyid);\r
51 int rtw_ap_set_wep_key(_adapter *padapter, u8 *key, u8 keylen, int keyid, u8 set_tx);\r
52 \r
53 #ifdef CONFIG_NATIVEAP_MLME\r
54 void associated_clients_update(_adapter *padapter, u8 updated, u32 sta_info_type);\r
55 void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta);\r
56 u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta);\r
57 void sta_info_update(_adapter *padapter, struct sta_info *psta);\r
58 void ap_sta_info_defer_update(_adapter *padapter, struct sta_info *psta);\r
59 u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reason, bool enqueue);\r
60 int rtw_sta_flush(_adapter *padapter, bool enqueue);\r
61 int rtw_ap_inform_ch_switch(_adapter *padapter, u8 new_ch, u8 ch_offset);\r
62 void start_ap_mode(_adapter *padapter);\r
63 void stop_ap_mode(_adapter *padapter);\r
64 #endif\r
65 \r
66 void rtw_ap_update_bss_chbw(_adapter *adapter, WLAN_BSSID_EX *bss, u8 ch, u8 bw, u8 offset);\r
67 bool rtw_ap_chbw_decision(_adapter *adapter, u8 req_ch, u8 req_bw, u8 req_offset, u8 *ch, u8 *bw, u8 *offset);\r
68 \r
69 #ifdef CONFIG_AUTO_AP_MODE\r
70 extern void rtw_start_auto_ap(_adapter *adapter);\r
71 #endif //CONFIG_AUTO_AP_MODE\r
72 \r
73 #endif //end of CONFIG_AP_MODE\r
74 \r
75 #endif\r
76 void update_bmc_sta(_adapter *padapter);\r
77 \r
78 void rtw_process_ht_action_smps(_adapter *padapter, u8 *ta, u8 ctrl_field);\r
79 void rtw_process_public_act_bsscoex(_adapter *padapter, u8 *pframe, uint frame_len);\r
80 \r