xref: /OK3568_Linux_fs/external/rkwifibt/drivers/bcmdhd/dhd_plat.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * DHD Linux platform header file
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Copyright (C) 2020, Broadcom.
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  *      Unless you and Broadcom execute a separate written software license
7*4882a593Smuzhiyun  * agreement governing use of this software, this software is licensed to you
8*4882a593Smuzhiyun  * under the terms of the GNU General Public License version 2 (the "GPL"),
9*4882a593Smuzhiyun  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10*4882a593Smuzhiyun  * following added to such license:
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  *      As a special exception, the copyright holders of this software give you
13*4882a593Smuzhiyun  * permission to link this software with independent modules, and to copy and
14*4882a593Smuzhiyun  * distribute the resulting executable under terms of your choice, provided that
15*4882a593Smuzhiyun  * you also meet, for each linked independent module, the terms and conditions of
16*4882a593Smuzhiyun  * the license of that module.  An independent module is a module which is not
17*4882a593Smuzhiyun  * derived from this software.  The special exception does not apply to any
18*4882a593Smuzhiyun  * modifications of the software.
19*4882a593Smuzhiyun  *
20*4882a593Smuzhiyun  *
21*4882a593Smuzhiyun  * <<Broadcom-WL-IPTag/Open:>>
22*4882a593Smuzhiyun  *
23*4882a593Smuzhiyun  * $Id$
24*4882a593Smuzhiyun  */
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun #ifndef __DHD_PLAT_H__
27*4882a593Smuzhiyun #define __DHD_PLAT_H__
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun #include <linuxver.h>
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun #if !defined(CONFIG_WIFI_CONTROL_FUNC)
32*4882a593Smuzhiyun #define WLAN_PLAT_NODFS_FLAG	0x01
33*4882a593Smuzhiyun #define WLAN_PLAT_AP_FLAG	0x02
34*4882a593Smuzhiyun struct wifi_platform_data {
35*4882a593Smuzhiyun 	int (*set_power)(int val, wifi_adapter_info_t *adapter);
36*4882a593Smuzhiyun 	int (*set_reset)(int val);
37*4882a593Smuzhiyun 	int (*set_carddetect)(int val);
38*4882a593Smuzhiyun #ifdef DHD_COREDUMP
39*4882a593Smuzhiyun 	int (*set_coredump)(const char *buf, int buf_len, const char *info);
40*4882a593Smuzhiyun #endif /* DHD_COREDUMP */
41*4882a593Smuzhiyun #if defined(BCMDHD_MDRIVER) && !defined(DHD_STATIC_IN_DRIVER)
42*4882a593Smuzhiyun 	void *(*mem_prealloc)(uint bus_type, int index, int section, unsigned long size);
43*4882a593Smuzhiyun #else
44*4882a593Smuzhiyun 	void *(*mem_prealloc)(int section, unsigned long size);
45*4882a593Smuzhiyun #endif
46*4882a593Smuzhiyun 	int (*get_mac_addr)(unsigned char *buf, int ifidx);
47*4882a593Smuzhiyun #ifdef BCMSDIO
48*4882a593Smuzhiyun 	int (*get_wake_irq)(void);
49*4882a593Smuzhiyun #endif
50*4882a593Smuzhiyun #ifdef CUSTOM_FORCE_NODFS_FLAG
51*4882a593Smuzhiyun 	void *(*get_country_code)(char *ccode, u32 flags);
52*4882a593Smuzhiyun #else /* defined (CUSTOM_FORCE_NODFS_FLAG) */
53*4882a593Smuzhiyun 	void *(*get_country_code)(char *ccode);
54*4882a593Smuzhiyun #endif
55*4882a593Smuzhiyun };
56*4882a593Smuzhiyun #endif /* CONFIG_WIFI_CONTROL_FUNC */
57*4882a593Smuzhiyun 
58*4882a593Smuzhiyun #endif /* __DHD_PLAT_H__ */
59