• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifdef BUS_POWER_RESTORE
36 	int (*set_power)(int val, wifi_adapter_info_t *adapter);
37 #else
38 	int (*set_power)(int val);
39 #endif
40 	int (*set_reset)(int val);
41 	int (*set_carddetect)(int val);
42 #ifdef DHD_COREDUMP
43 	int (*set_coredump)(const char *buf, int buf_len, const char *info);
44 #endif /* DHD_COREDUMP */
45 	void *(*mem_prealloc)(int section, unsigned long size);
46 #ifdef CUSTOM_MULTI_MAC
47 	int (*get_mac_addr)(unsigned char *buf, char *name);
48 #else
49 	int (*get_mac_addr)(unsigned char *buf);
50 #endif
51 #ifdef BCMSDIO
52 	int (*get_wake_irq)(void);
53 #endif
54 #ifdef CUSTOM_FORCE_NODFS_FLAG
55 	void *(*get_country_code)(char *ccode, u32 flags);
56 #else /* defined (CUSTOM_FORCE_NODFS_FLAG) */
57 	void *(*get_country_code)(char *ccode);
58 #endif
59 };
60 #endif /* CONFIG_WIFI_CONTROL_FUNC */
61 
62 #endif /* __DHD_PLAT_H__ */
63