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.
19 #include <ucode_loader.h>
22 D11UCODE_NAMETAG_START
= 0,
32 D11UCODE_OVERSIGHT16_MIMO
,
33 D11UCODE_OVERSIGHT16_MIMOSZ
,
34 D11UCODE_OVERSIGHT24_LCN
,
35 D11UCODE_OVERSIGHT24_LCNSZ
,
36 D11UCODE_OVERSIGHT_BOMMAJOR
,
37 D11UCODE_OVERSIGHT_BOMMINOR
40 int brcms_ucode_data_init(struct brcms_info
*wl
, struct brcms_ucode
*ucode
)
44 rc
= brcms_check_firmwares(wl
);
47 brcms_ucode_init_buf(wl
, (void **)&ucode
->d11lcn0bsinitvals24
,
50 rc
: brcms_ucode_init_buf(wl
, (void **)&ucode
->d11lcn0initvals24
,
53 rc
: brcms_ucode_init_buf(wl
, (void **)&ucode
->d11lcn1bsinitvals24
,
56 rc
: brcms_ucode_init_buf(wl
, (void **)&ucode
->d11lcn1initvals24
,
59 brcms_ucode_init_buf(wl
, (void **)&ucode
->d11lcn2bsinitvals24
,
62 rc
: brcms_ucode_init_buf(wl
, (void **)&ucode
->d11lcn2initvals24
,
65 rc
: brcms_ucode_init_buf(wl
, (void **)&ucode
->d11n0absinitvals16
,
68 rc
: brcms_ucode_init_buf(wl
, (void **)&ucode
->d11n0bsinitvals16
,
71 rc
: brcms_ucode_init_buf(wl
, (void **)&ucode
->d11n0initvals16
,
74 rc
: brcms_ucode_init_buf(wl
, (void **)&ucode
->bcm43xx_16_mimo
,
75 D11UCODE_OVERSIGHT16_MIMO
);
77 rc
: brcms_ucode_init_uint(wl
, &ucode
->bcm43xx_16_mimosz
,
78 D11UCODE_OVERSIGHT16_MIMOSZ
);
80 rc
: brcms_ucode_init_buf(wl
, (void **)&ucode
->bcm43xx_24_lcn
,
81 D11UCODE_OVERSIGHT24_LCN
);
83 rc
: brcms_ucode_init_uint(wl
, &ucode
->bcm43xx_24_lcnsz
,
84 D11UCODE_OVERSIGHT24_LCNSZ
);
86 rc
: brcms_ucode_init_buf(wl
, (void **)&ucode
->bcm43xx_bommajor
,
87 D11UCODE_OVERSIGHT_BOMMAJOR
);
89 rc
: brcms_ucode_init_buf(wl
, (void **)&ucode
->bcm43xx_bomminor
,
90 D11UCODE_OVERSIGHT_BOMMINOR
);
94 void brcms_ucode_data_free(struct brcms_ucode
*ucode
)
96 brcms_ucode_free_buf((void *)ucode
->d11lcn0bsinitvals24
);
97 brcms_ucode_free_buf((void *)ucode
->d11lcn0initvals24
);
98 brcms_ucode_free_buf((void *)ucode
->d11lcn1bsinitvals24
);
99 brcms_ucode_free_buf((void *)ucode
->d11lcn1initvals24
);
100 brcms_ucode_free_buf((void *)ucode
->d11lcn2bsinitvals24
);
101 brcms_ucode_free_buf((void *)ucode
->d11lcn2initvals24
);
102 brcms_ucode_free_buf((void *)ucode
->d11n0absinitvals16
);
103 brcms_ucode_free_buf((void *)ucode
->d11n0bsinitvals16
);
104 brcms_ucode_free_buf((void *)ucode
->d11n0initvals16
);
105 brcms_ucode_free_buf((void *)ucode
->bcm43xx_16_mimo
);
106 brcms_ucode_free_buf((void *)ucode
->bcm43xx_24_lcn
);
107 brcms_ucode_free_buf((void *)ucode
->bcm43xx_bommajor
);
108 brcms_ucode_free_buf((void *)ucode
->bcm43xx_bomminor
);