WiFi: add rtl8189es/etv support, Optimization wifi configuration.
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8189es / include / rtw_android.h
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  
21 #ifndef __RTW_ANDROID_H__
22 #define __RTW_ANDROID_H__
23
24 enum ANDROID_WIFI_CMD {
25         ANDROID_WIFI_CMD_START,                         
26         ANDROID_WIFI_CMD_STOP,                  
27         ANDROID_WIFI_CMD_SCAN_ACTIVE,
28         ANDROID_WIFI_CMD_SCAN_PASSIVE,          
29         ANDROID_WIFI_CMD_RSSI,  
30         ANDROID_WIFI_CMD_LINKSPEED,
31         ANDROID_WIFI_CMD_RXFILTER_START,
32         ANDROID_WIFI_CMD_RXFILTER_STOP, 
33         ANDROID_WIFI_CMD_RXFILTER_ADD,  
34         ANDROID_WIFI_CMD_RXFILTER_REMOVE,
35         ANDROID_WIFI_CMD_BTCOEXSCAN_START,
36         ANDROID_WIFI_CMD_BTCOEXSCAN_STOP,
37         ANDROID_WIFI_CMD_BTCOEXMODE,
38         ANDROID_WIFI_CMD_SETSUSPENDOPT,
39         ANDROID_WIFI_CMD_P2P_DEV_ADDR,  
40         ANDROID_WIFI_CMD_SETFWPATH,             
41         ANDROID_WIFI_CMD_SETBAND,               
42         ANDROID_WIFI_CMD_GETBAND,                       
43         ANDROID_WIFI_CMD_COUNTRY,                       
44         ANDROID_WIFI_CMD_P2P_SET_NOA,
45         ANDROID_WIFI_CMD_P2P_GET_NOA,   
46         ANDROID_WIFI_CMD_P2P_SET_PS,    
47         ANDROID_WIFI_CMD_SET_AP_WPS_P2P_IE,
48 #ifdef CONFIG_PNO_SUPPORT
49         ANDROID_WIFI_CMD_PNOSSIDCLR_SET,
50         ANDROID_WIFI_CMD_PNOSETUP_SET,
51         ANDROID_WIFI_CMD_PNOENABLE_SET,
52         ANDROID_WIFI_CMD_PNODEBUG_SET,
53 #endif
54
55         ANDROID_WIFI_CMD_MACADDR,
56
57         ANDROID_WIFI_CMD_BLOCK,
58
59         ANDROID_WIFI_CMD_WFD_ENABLE,
60         ANDROID_WIFI_CMD_WFD_DISABLE,
61         
62         ANDROID_WIFI_CMD_WFD_SET_TCPPORT,
63         ANDROID_WIFI_CMD_WFD_SET_MAX_TPUT,
64         ANDROID_WIFI_CMD_WFD_SET_DEVTYPE,
65         ANDROID_WIFI_CMD_CHANGE_DTIM,
66         ANDROID_WIFI_CMD_HOSTAPD_SET_MACADDR_ACL,
67         ANDROID_WIFI_CMD_HOSTAPD_ACL_ADD_STA,
68         ANDROID_WIFI_CMD_HOSTAPD_ACL_REMOVE_STA,
69 #ifdef CONFIG_GTK_OL
70         ANDROID_WIFI_CMD_GTK_REKEY_OFFLOAD,
71 #endif //CONFIG_GTK_OL
72         ANDROID_WIFI_CMD_P2P_DISABLE,
73         ANDROID_WIFI_CMD_MAX
74 };
75
76 int rtw_android_cmdstr_to_num(char *cmdstr);
77 int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd);
78
79 #if defined(RTW_ENABLE_WIFI_CONTROL_FUNC)
80 int rtw_android_wifictrl_func_add(void);
81 void rtw_android_wifictrl_func_del(void);
82 void* wl_android_prealloc(int section, unsigned long size);
83
84 int wifi_get_irq_number(unsigned long *irq_flags_ptr);
85 int wifi_set_power(int on, unsigned long msec);
86 int wifi_get_mac_addr(unsigned char *buf);
87 void *wifi_get_country_code(char *ccode);
88 #else
89 static int rtw_android_wifictrl_func_add(void) { return 0; }
90 static void rtw_android_wifictrl_func_del(void) {}
91 #endif /* defined(RTW_ENABLE_WIFI_CONTROL_FUNC) */
92
93 #endif //__RTW_ANDROID_H__
94