2 * Copyright (c) 2010 Broadcom Corporation
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.
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.
17 #include <linux/types.h>
19 #include <d11ucode_ext.h>
24 d11init_t *d11lcn0bsinitvals24;
25 d11init_t *d11lcn0initvals24;
26 d11init_t *d11lcn1bsinitvals24;
27 d11init_t *d11lcn1initvals24;
28 d11init_t *d11lcn2bsinitvals24;
29 d11init_t *d11lcn2initvals24;
30 d11init_t *d11n0absinitvals16;
31 d11init_t *d11n0bsinitvals16;
32 d11init_t *d11n0initvals16;
34 u32 bcm43xx_16_mimosz;
37 u32 *bcm43xx_bommajor;
38 u32 *bcm43xx_bomminor;
40 int wl_ucode_data_init(struct wl_info *wl)
43 rc = wl_check_firmwares(wl);
45 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn0bsinitvals24,
47 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn0initvals24,
49 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn1bsinitvals24,
51 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn1initvals24,
53 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn2bsinitvals24,
55 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn2initvals24,
57 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11n0absinitvals16,
59 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11n0bsinitvals16,
61 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11n0initvals16,
63 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_16_mimo,
64 D11UCODE_OVERSIGHT16_MIMO);
65 rc = rc < 0 ? rc : wl_ucode_init_uint(wl, &bcm43xx_16_mimosz,
66 D11UCODE_OVERSIGHT16_MIMOSZ);
67 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_24_lcn,
68 D11UCODE_OVERSIGHT24_LCN);
69 rc = rc < 0 ? rc : wl_ucode_init_uint(wl, &bcm43xx_24_lcnsz,
70 D11UCODE_OVERSIGHT24_LCNSZ);
71 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_bommajor,
72 D11UCODE_OVERSIGHT_BOMMAJOR);
73 rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_bomminor,
74 D11UCODE_OVERSIGHT_BOMMINOR);
78 void wl_ucode_data_free(void)
80 wl_ucode_free_buf((void *)d11lcn0bsinitvals24);
81 wl_ucode_free_buf((void *)d11lcn0initvals24);
82 wl_ucode_free_buf((void *)d11lcn1bsinitvals24);
83 wl_ucode_free_buf((void *)d11lcn1initvals24);
84 wl_ucode_free_buf((void *)d11lcn2bsinitvals24);
85 wl_ucode_free_buf((void *)d11lcn2initvals24);
86 wl_ucode_free_buf((void *)d11n0absinitvals16);
87 wl_ucode_free_buf((void *)d11n0bsinitvals16);
88 wl_ucode_free_buf((void *)d11n0initvals16);
89 wl_ucode_free_buf((void *)bcm43xx_16_mimo);
90 wl_ucode_free_buf((void *)bcm43xx_24_lcn);
91 wl_ucode_free_buf((void *)bcm43xx_bommajor);
92 wl_ucode_free_buf((void *)bcm43xx_bomminor);