xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/msf.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Common interface to MSF (multi-segment format) definitions.
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/Dual:>>
22  */
23 
24 #ifndef _WLC_MSF_H_
25 #define _WLC_MSF_H_
26 
27 struct wl_segment {
28 	uint32 type;
29 	uint32 offset;
30 	uint32 length;
31 	uint32 crc32;
32 	uint32 flags;
33 };
34 typedef struct wl_segment wl_segment_t;
35 
36 struct wl_segment_info {
37 	uint8        magic[4];
38 	uint32       hdr_len;
39 	uint32       crc32;
40 	uint32       file_type;
41 	uint32       num_segments;
42 	wl_segment_t segments[1];
43 };
44 typedef struct wl_segment_info wl_segment_info_t;
45 
46 typedef struct wlc_blob_segment {
47 	uint32 type;
48 	uint8  *data;
49 	uint32 length;
50 } wlc_blob_segment_t;
51 
52 /** Segment types in Binary Eventlog Archive file */
53 enum bea_seg_type_e {
54 	MSF_SEG_TYP_RTECDC_BIN  = 1,
55 	MSF_SEG_TYP_LOGSTRS_BIN = 2,
56 	MSF_SEG_TYP_FW_SYMBOLS  = 3,
57 	MSF_SEG_TYP_ROML_BIN    = 4
58 };
59 
60 #endif /* _WLC_MSF_H */
61