forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/net/wireless/ath/wil6210/fw.h
....@@ -1,18 +1,7 @@
1
+/* SPDX-License-Identifier: ISC */
12 /*
23 * 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.
165 */
176 #ifndef __WIL_FW_H__
187 #define __WIL_FW_H__
....@@ -44,7 +33,7 @@
4433 */
4534 struct wil_fw_record_data { /* type == wil_fw_type_data */
4635 __le32 addr;
47
- __le32 data[0]; /* [data_size], see above */
36
+ __le32 data[]; /* [data_size], see above */
4837 } __packed;
4938
5039 /* fill with constant @value, @size bytes starting from @addr */
....@@ -72,7 +61,7 @@
7261 /* identifies capabilities record */
7362 struct wil_fw_record_comment_hdr hdr;
7463 /* capabilities (variable size), see enum wmi_fw_capability */
75
- u8 capabilities[0];
64
+ u8 capabilities[];
7665 } __packed;
7766
7867 /* FW VIF concurrency encoded inside a comment record
....@@ -91,7 +80,7 @@
9180 u8 n_diff_channels; /* total number of different channels allowed */
9281 u8 same_bi; /* for APs, 1 if all APs must have same BI */
9382 /* keep last - concurrency limits, variable size by n_limits */
94
- struct wil_fw_concurrency_limit limits[0];
83
+ struct wil_fw_concurrency_limit limits[];
9584 } __packed;
9685
9786 struct wil_fw_record_concurrency { /* type == wil_fw_type_comment */
....@@ -104,17 +93,22 @@
10493 /* number of concurrency combinations that follow */
10594 __le16 n_combos;
10695 /* keep last - combinations, variable size by n_combos */
107
- struct wil_fw_concurrency_combo combos[0];
96
+ struct wil_fw_concurrency_combo combos[];
10897 } __packed;
10998
11099 /* brd file info encoded inside a comment record */
111100 #define WIL_BRD_FILE_MAGIC (0xabcddcbb)
101
+
102
+struct brd_info {
103
+ __le32 base_addr;
104
+ __le32 max_size_bytes;
105
+} __packed;
106
+
112107 struct wil_fw_record_brd_file { /* type == wil_fw_type_comment */
113108 /* identifies brd file record */
114109 struct wil_fw_record_comment_hdr hdr;
115110 __le32 version;
116
- __le32 base_addr;
117
- __le32 max_size_bytes;
111
+ struct brd_info brd_info[];
118112 } __packed;
119113
120114 /* perform action
....@@ -122,7 +116,7 @@
122116 */
123117 struct wil_fw_record_action { /* type == wil_fw_type_action */
124118 __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 */
126120 } __packed;
127121
128122 /* data block for struct wil_fw_record_direct_write */
....@@ -185,7 +179,7 @@
185179 #define WIL_FW_GW_CTL_BUSY BIT(29) /* gateway busy performing operation */
186180 #define WIL_FW_GW_CTL_RUN BIT(30) /* start gateway operation */
187181 __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 */
189183 } __packed;
190184
191185 /* 4-dword gateway */
....@@ -207,7 +201,7 @@
207201 __le32 gateway_cmd_addr;
208202 __le32 gateway_ctrl_address; /* same logic as for 1-dword gw */
209203 __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 */
211205 } __packed;
212206
213207 #endif /* __WIL_FW_H__ */