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