.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: ISC */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2014,2016 Qualcomm Atheros, Inc. |
---|
3 | | - * Copyright (c) 2018, The Linux Foundation. All rights reserved. |
---|
4 | | - * |
---|
5 | | - * Permission to use, copy, modify, and/or distribute this software for any |
---|
6 | | - * purpose with or without fee is hereby granted, provided that the above |
---|
7 | | - * copyright notice and this permission notice appear in all copies. |
---|
8 | | - * |
---|
9 | | - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
---|
10 | | - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
---|
11 | | - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
---|
12 | | - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
---|
13 | | - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
---|
14 | | - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
---|
15 | | - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
| 4 | + * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. |
---|
16 | 5 | */ |
---|
17 | 6 | #ifndef __WIL_FW_H__ |
---|
18 | 7 | #define __WIL_FW_H__ |
---|
.. | .. |
---|
44 | 33 | */ |
---|
45 | 34 | struct wil_fw_record_data { /* type == wil_fw_type_data */ |
---|
46 | 35 | __le32 addr; |
---|
47 | | - __le32 data[0]; /* [data_size], see above */ |
---|
| 36 | + __le32 data[]; /* [data_size], see above */ |
---|
48 | 37 | } __packed; |
---|
49 | 38 | |
---|
50 | 39 | /* fill with constant @value, @size bytes starting from @addr */ |
---|
.. | .. |
---|
72 | 61 | /* identifies capabilities record */ |
---|
73 | 62 | struct wil_fw_record_comment_hdr hdr; |
---|
74 | 63 | /* capabilities (variable size), see enum wmi_fw_capability */ |
---|
75 | | - u8 capabilities[0]; |
---|
| 64 | + u8 capabilities[]; |
---|
76 | 65 | } __packed; |
---|
77 | 66 | |
---|
78 | 67 | /* FW VIF concurrency encoded inside a comment record |
---|
.. | .. |
---|
91 | 80 | u8 n_diff_channels; /* total number of different channels allowed */ |
---|
92 | 81 | u8 same_bi; /* for APs, 1 if all APs must have same BI */ |
---|
93 | 82 | /* keep last - concurrency limits, variable size by n_limits */ |
---|
94 | | - struct wil_fw_concurrency_limit limits[0]; |
---|
| 83 | + struct wil_fw_concurrency_limit limits[]; |
---|
95 | 84 | } __packed; |
---|
96 | 85 | |
---|
97 | 86 | struct wil_fw_record_concurrency { /* type == wil_fw_type_comment */ |
---|
.. | .. |
---|
104 | 93 | /* number of concurrency combinations that follow */ |
---|
105 | 94 | __le16 n_combos; |
---|
106 | 95 | /* keep last - combinations, variable size by n_combos */ |
---|
107 | | - struct wil_fw_concurrency_combo combos[0]; |
---|
| 96 | + struct wil_fw_concurrency_combo combos[]; |
---|
108 | 97 | } __packed; |
---|
109 | 98 | |
---|
110 | 99 | /* brd file info encoded inside a comment record */ |
---|
111 | 100 | #define WIL_BRD_FILE_MAGIC (0xabcddcbb) |
---|
| 101 | + |
---|
| 102 | +struct brd_info { |
---|
| 103 | + __le32 base_addr; |
---|
| 104 | + __le32 max_size_bytes; |
---|
| 105 | +} __packed; |
---|
| 106 | + |
---|
112 | 107 | struct wil_fw_record_brd_file { /* type == wil_fw_type_comment */ |
---|
113 | 108 | /* identifies brd file record */ |
---|
114 | 109 | struct wil_fw_record_comment_hdr hdr; |
---|
115 | 110 | __le32 version; |
---|
116 | | - __le32 base_addr; |
---|
117 | | - __le32 max_size_bytes; |
---|
| 111 | + struct brd_info brd_info[]; |
---|
118 | 112 | } __packed; |
---|
119 | 113 | |
---|
120 | 114 | /* perform action |
---|
.. | .. |
---|
122 | 116 | */ |
---|
123 | 117 | struct wil_fw_record_action { /* type == wil_fw_type_action */ |
---|
124 | 118 | __le32 action; /* action to perform: reset, wait for fw ready etc. */ |
---|
125 | | - __le32 data[0]; /* action specific, [data_size], see above */ |
---|
| 119 | + __le32 data[]; /* action specific, [data_size], see above */ |
---|
126 | 120 | } __packed; |
---|
127 | 121 | |
---|
128 | 122 | /* data block for struct wil_fw_record_direct_write */ |
---|
.. | .. |
---|
185 | 179 | #define WIL_FW_GW_CTL_BUSY BIT(29) /* gateway busy performing operation */ |
---|
186 | 180 | #define WIL_FW_GW_CTL_RUN BIT(30) /* start gateway operation */ |
---|
187 | 181 | __le32 command; |
---|
188 | | - struct wil_fw_data_gw data[0]; /* total size [data_size], see above */ |
---|
| 182 | + struct wil_fw_data_gw data[]; /* total size [data_size], see above */ |
---|
189 | 183 | } __packed; |
---|
190 | 184 | |
---|
191 | 185 | /* 4-dword gateway */ |
---|
.. | .. |
---|
207 | 201 | __le32 gateway_cmd_addr; |
---|
208 | 202 | __le32 gateway_ctrl_address; /* same logic as for 1-dword gw */ |
---|
209 | 203 | __le32 command; |
---|
210 | | - struct wil_fw_data_gw4 data[0]; /* total size [data_size], see above */ |
---|
| 204 | + struct wil_fw_data_gw4 data[]; /* total size [data_size], see above */ |
---|
211 | 205 | } __packed; |
---|
212 | 206 | |
---|
213 | 207 | #endif /* __WIL_FW_H__ */ |
---|