Merge branch 'for-linus' of git://git.kernel.dk/linux-block
[pandora-kernel.git] / drivers / staging / brcm80211 / brcmsmac / ucode_loader.h
1 /*
2  * Copyright (c) 2010 Broadcom Corporation
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16
17 #include "types.h"              /* forward structure declarations */
18
19 #define MIN_FW_SIZE 40000       /* minimum firmware file size in bytes */
20 #define MAX_FW_SIZE 150000
21
22 #define UCODE_LOADER_API_VER 0
23
24 struct d11init {
25         u16 addr;
26         u16 size;
27         u32 value;
28 };
29
30 extern struct d11init *d11lcn0bsinitvals24;
31 extern struct d11init *d11lcn0initvals24;
32 extern struct d11init *d11lcn1bsinitvals24;
33 extern struct d11init *d11lcn1initvals24;
34 extern struct d11init *d11lcn2bsinitvals24;
35 extern struct d11init *d11lcn2initvals24;
36 extern struct d11init *d11n0absinitvals16;
37 extern struct d11init *d11n0bsinitvals16;
38 extern struct d11init *d11n0initvals16;
39 extern u32 *bcm43xx_16_mimo;
40 extern u32 bcm43xx_16_mimosz;
41 extern u32 *bcm43xx_24_lcn;
42 extern u32 bcm43xx_24_lcnsz;
43
44 extern int brcms_ucode_data_init(struct brcms_info *wl);
45 extern void brcms_ucode_data_free(void);
46
47 extern int brcms_ucode_init_buf(struct brcms_info *wl, void **pbuf,
48                                 unsigned int idx);
49 extern int brcms_ucode_init_uint(struct brcms_info *wl, unsigned *data,
50                               unsigned int idx);
51 extern void brcms_ucode_free_buf(void *);
52 extern int  brcms_check_firmwares(struct brcms_info *wl);