• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Common interface to MSF (multi-segment format) definitions.
4  *
5  * Copyright (C) 1999-2019, Broadcom.
6  *
7  *      Unless you and Broadcom execute a separate written software license
8  * agreement governing use of this software, this software is licensed to you
9  * under the terms of the GNU General Public License version 2 (the "GPL"),
10  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
11  * following added to such license:
12  *
13  *      As a special exception, the copyright holders of this software give you
14  * permission to link this software with independent modules, and to copy and
15  * distribute the resulting executable under terms of your choice, provided that
16  * you also meet, for each linked independent module, the terms and conditions of
17  * the license of that module.  An independent module is a module which is not
18  * derived from this software.  The special exception does not apply to any
19  * modifications of the software.
20  *
21  *      Notwithstanding the above, under no circumstances may you combine this
22  * software in any way with any other Broadcom software provided under a license
23  * other than the GPL, without Broadcom's express prior written consent.
24  *
25  *
26  * <<Broadcom-WL-IPTag/Open:>>
27  *
28  * $Id: msf.h 619634 2016-02-17 19:01:25Z $
29  */
30 
31 #ifndef _WLC_MSF_H_
32 #define _WLC_MSF_H_
33 
34 struct wl_segment {
35 	uint32 type;
36 	uint32 offset;
37 	uint32 length;
38 	uint32 crc32;
39 	uint32 flags;
40 };
41 typedef struct wl_segment wl_segment_t;
42 
43 struct wl_segment_info {
44 	uint8        magic[4];
45 	uint32       hdr_len;
46 	uint32       crc32;
47 	uint32       file_type;
48 	uint32       num_segments;
49 	wl_segment_t segments[1];
50 };
51 typedef struct wl_segment_info wl_segment_info_t;
52 
53 typedef struct wlc_blob_segment {
54 	uint32 type;
55 	uint8  *data;
56 	uint32 length;
57 } wlc_blob_segment_t;
58 
59 /** Segment types in Binary Eventlog Archive file */
60 enum bea_seg_type_e {
61 	MSF_SEG_TYP_RTECDC_BIN  = 1,
62 	MSF_SEG_TYP_LOGSTRS_BIN = 2,
63 	MSF_SEG_TYP_FW_SYMBOLS  = 3,
64 	MSF_SEG_TYP_ROML_BIN    = 4
65 };
66 
67 #endif /* _WLC_MSF_H */
68