.. | .. |
---|
1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
---|
2 | 1 | /* |
---|
3 | 2 | * Common function shared by Linux WEXT, cfg80211 and p2p drivers |
---|
4 | 3 | * |
---|
5 | | - * Copyright (C) 1999-2019, Broadcom Corporation |
---|
6 | | - * |
---|
| 4 | + * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation |
---|
| 5 | + * |
---|
| 6 | + * Copyright (C) 1999-2017, Broadcom Corporation |
---|
| 7 | + * |
---|
7 | 8 | * Unless you and Broadcom execute a separate written software license |
---|
8 | 9 | * agreement governing use of this software, this software is licensed to you |
---|
9 | 10 | * under the terms of the GNU General Public License version 2 (the "GPL"), |
---|
10 | 11 | * available at http://www.broadcom.com/licenses/GPLv2.php, with the |
---|
11 | 12 | * following added to such license: |
---|
12 | | - * |
---|
| 13 | + * |
---|
13 | 14 | * As a special exception, the copyright holders of this software give you |
---|
14 | 15 | * permission to link this software with independent modules, and to copy and |
---|
15 | 16 | * distribute the resulting executable under terms of your choice, provided that |
---|
.. | .. |
---|
17 | 18 | * the license of that module. An independent module is a module which is not |
---|
18 | 19 | * derived from this software. The special exception does not apply to any |
---|
19 | 20 | * modifications of the software. |
---|
20 | | - * |
---|
| 21 | + * |
---|
21 | 22 | * Notwithstanding the above, under no circumstances may you combine this |
---|
22 | 23 | * software in any way with any other Broadcom software provided under a license |
---|
23 | 24 | * other than the GPL, without Broadcom's express prior written consent. |
---|
.. | .. |
---|
25 | 26 | * |
---|
26 | 27 | * <<Broadcom-WL-IPTag/Open:>> |
---|
27 | 28 | * |
---|
28 | | - * $Id: wldev_common.h 556083 2015-05-12 14:03:00Z $ |
---|
| 29 | + * $Id: wldev_common.h 695669 2017-04-21 13:04:52Z $ |
---|
29 | 30 | */ |
---|
30 | 31 | #ifndef __WLDEV_COMMON_H__ |
---|
31 | 32 | #define __WLDEV_COMMON_H__ |
---|
.. | .. |
---|
36 | 37 | * netdev_ops->ndo_do_ioctl in new kernels) |
---|
37 | 38 | * @dev: the net_device handle |
---|
38 | 39 | */ |
---|
39 | | -s32 wldev_ioctl( |
---|
40 | | - struct net_device *dev, u32 cmd, void *arg, u32 len, u32 set); |
---|
| 40 | + |
---|
| 41 | +s32 wldev_ioctl_get( |
---|
| 42 | + struct net_device *dev, u32 cmd, void *arg, u32 len); |
---|
| 43 | + |
---|
| 44 | +s32 wldev_ioctl_set( |
---|
| 45 | + struct net_device *dev, u32 cmd, const void *arg, u32 len); |
---|
41 | 46 | |
---|
42 | 47 | /** Retrieve named IOVARs, this function calls wl_dev_ioctl with |
---|
43 | 48 | * WLC_GET_VAR IOCTL code |
---|
44 | 49 | */ |
---|
45 | 50 | s32 wldev_iovar_getbuf( |
---|
46 | 51 | struct net_device *dev, s8 *iovar_name, |
---|
47 | | - void *param, s32 paramlen, void *buf, s32 buflen, struct mutex* buf_sync); |
---|
| 52 | + const void *param, s32 paramlen, void *buf, s32 buflen, struct mutex* buf_sync); |
---|
48 | 53 | |
---|
49 | 54 | /** Set named IOVARs, this function calls wl_dev_ioctl with |
---|
50 | 55 | * WLC_SET_VAR IOCTL code |
---|
51 | 56 | */ |
---|
52 | 57 | s32 wldev_iovar_setbuf( |
---|
53 | 58 | struct net_device *dev, s8 *iovar_name, |
---|
54 | | - void *param, s32 paramlen, void *buf, s32 buflen, struct mutex* buf_sync); |
---|
| 59 | + const void *param, s32 paramlen, void *buf, s32 buflen, struct mutex* buf_sync); |
---|
55 | 60 | |
---|
56 | 61 | s32 wldev_iovar_setint( |
---|
57 | 62 | struct net_device *dev, s8 *iovar, s32 val); |
---|
.. | .. |
---|
64 | 69 | */ |
---|
65 | 70 | |
---|
66 | 71 | s32 wldev_mkiovar_bsscfg( |
---|
67 | | - const s8 *iovar_name, s8 *param, s32 paramlen, |
---|
| 72 | + const s8 *iovar_name, const s8 *param, s32 paramlen, |
---|
68 | 73 | s8 *iovar_buf, s32 buflen, s32 bssidx); |
---|
69 | 74 | |
---|
70 | 75 | /** Retrieve named and bsscfg indexed IOVARs, this function calls wl_dev_ioctl with |
---|
.. | .. |
---|
78 | 83 | * WLC_SET_VAR IOCTL code |
---|
79 | 84 | */ |
---|
80 | 85 | s32 wldev_iovar_setbuf_bsscfg( |
---|
81 | | - struct net_device *dev, s8 *iovar_name, void *param, s32 paramlen, |
---|
| 86 | + struct net_device *dev, const s8 *iovar_name, const void *param, s32 paramlen, |
---|
82 | 87 | void *buf, s32 buflen, s32 bsscfg_idx, struct mutex* buf_sync); |
---|
83 | 88 | |
---|
84 | 89 | s32 wldev_iovar_getint_bsscfg( |
---|
.. | .. |
---|
95 | 100 | extern void dhd_get_customized_country_code(struct net_device *dev, char *country_iso_code, |
---|
96 | 101 | wl_country_t *cspec); |
---|
97 | 102 | extern void dhd_bus_country_set(struct net_device *dev, wl_country_t *cspec, bool notify); |
---|
| 103 | +#ifdef OEM_ANDROID |
---|
98 | 104 | extern bool dhd_force_country_change(struct net_device *dev); |
---|
| 105 | +#endif // endif |
---|
99 | 106 | extern void dhd_bus_band_set(struct net_device *dev, uint band); |
---|
100 | 107 | extern int wldev_set_country(struct net_device *dev, char *country_code, bool notify, |
---|
101 | 108 | bool user_enforced, int revinfo); |
---|
.. | .. |
---|
106 | 113 | extern int net_os_set_dtim_skip(struct net_device *dev, int val); |
---|
107 | 114 | extern int net_os_set_suspend_disable(struct net_device *dev, int val); |
---|
108 | 115 | extern int net_os_set_suspend(struct net_device *dev, int val, int force); |
---|
109 | | -extern int wl_iw_parse_ssid_list_tlv(char** list_str, wlc_ssid_ext_t* ssid, |
---|
| 116 | +extern int net_os_set_suspend_bcn_li_dtim(struct net_device *dev, int val); |
---|
| 117 | +extern int net_os_set_max_dtim_enable(struct net_device *dev, int val); |
---|
| 118 | +#ifdef DISABLE_DTIM_IN_SUSPEND |
---|
| 119 | +extern int net_os_set_disable_dtim_in_suspend(struct net_device *dev, int val); |
---|
| 120 | +#endif /* DISABLE_DTIM_IN_SUSPEND */ |
---|
| 121 | +#if defined(OEM_ANDROID) |
---|
| 122 | +extern int wl_parse_ssid_list_tlv(char** list_str, wlc_ssid_ext_t* ssid, |
---|
110 | 123 | int max, int *bytes_left); |
---|
| 124 | +#endif /* defined(OEM_ANDROID) */ |
---|
111 | 125 | |
---|
112 | 126 | /* Get the link speed from dongle, speed is in kpbs */ |
---|
113 | 127 | int wldev_get_link_speed(struct net_device *dev, int *plink_speed); |
---|
.. | .. |
---|
117 | 131 | int wldev_get_ssid(struct net_device *dev, wlc_ssid_t *pssid); |
---|
118 | 132 | |
---|
119 | 133 | int wldev_get_band(struct net_device *dev, uint *pband); |
---|
120 | | -int wldev_get_mode(struct net_device *dev, uint8 *pband); |
---|
| 134 | +int wldev_get_mode(struct net_device *dev, uint8 *pband, uint8 caplen); |
---|
121 | 135 | int wldev_get_datarate(struct net_device *dev, int *datarate); |
---|
122 | 136 | int wldev_set_band(struct net_device *dev, uint band); |
---|
123 | 137 | |
---|