1 /*****************************************************************************
3 (c) Cambridge Silicon Radio Limited 2011
4 All rights reserved and confidential information of CSR
6 Refer to LICENSE.txt included with this source for details
9 *****************************************************************************/
12 * ---------------------------------------------------------------------------
13 * FILE: csr_wifi_hip_xbv.h
16 * Definitions and declarations for code to read XBV files - the UniFi
17 * firmware download file format.
19 * ---------------------------------------------------------------------------
24 #ifndef CSR_WIFI_XBV_TEST
26 #include "csr_wifi_hip_unifi.h"
72 /* An XBV1 file can either contain firmware or patches (at the
73 * moment). The 'mode' member of the xbv1_t structure tells us which
86 /* Parts of a Firmware XBV1 */
88 struct VMEQ vmeq[MAX_VMEQ];
90 struct VAND vand[MAX_VAND];
95 /* F/W download image, possibly more than one part */
96 struct FWDL fwdl[MAX_FWDL];
99 /* F/W overlay image, add r not used */
102 /* Parts of a Patch XBV1 */
106 struct PTDL ptdl[MAX_PTDL];
111 typedef s32 (*fwreadfn_t)(void *ospriv, void *dlpriv, u32 offset, void *buf, u32 len);
113 CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo);
114 s32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo,
115 symbol_t *slut, u32 slut_len);
116 void* xbv_to_patch(card_t *card, fwreadfn_t readfn, const void *fw_buf, const xbv1_t *fwinfo,
119 #endif /* __XBV_H__ */