~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/staging/brcm80211/brcmsmac/wl_ucode_loader.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 <linux/types.h>
 
18
#include <bcmdefs.h>
 
19
#include <wl_ucode.h>
 
20
 
 
21
enum {
 
22
        D11UCODE_NAMETAG_START = 0,
 
23
        D11LCN0BSINITVALS24,
 
24
        D11LCN0INITVALS24,
 
25
        D11LCN1BSINITVALS24,
 
26
        D11LCN1INITVALS24,
 
27
        D11LCN2BSINITVALS24,
 
28
        D11LCN2INITVALS24,
 
29
        D11N0ABSINITVALS16,
 
30
        D11N0BSINITVALS16,
 
31
        D11N0INITVALS16,
 
32
        D11UCODE_OVERSIGHT16_MIMO,
 
33
        D11UCODE_OVERSIGHT16_MIMOSZ,
 
34
        D11UCODE_OVERSIGHT24_LCN,
 
35
        D11UCODE_OVERSIGHT24_LCNSZ,
 
36
        D11UCODE_OVERSIGHT_BOMMAJOR,
 
37
        D11UCODE_OVERSIGHT_BOMMINOR
 
38
};
 
39
 
 
40
struct d11init *d11lcn0bsinitvals24;
 
41
struct d11init *d11lcn0initvals24;
 
42
struct d11init *d11lcn1bsinitvals24;
 
43
struct d11init *d11lcn1initvals24;
 
44
struct d11init *d11lcn2bsinitvals24;
 
45
struct d11init *d11lcn2initvals24;
 
46
struct d11init *d11n0absinitvals16;
 
47
struct d11init *d11n0bsinitvals16;
 
48
struct d11init *d11n0initvals16;
 
49
u32 *bcm43xx_16_mimo;
 
50
u32 bcm43xx_16_mimosz;
 
51
u32 *bcm43xx_24_lcn;
 
52
u32 bcm43xx_24_lcnsz;
 
53
u32 *bcm43xx_bommajor;
 
54
u32 *bcm43xx_bomminor;
 
55
 
 
56
int wl_ucode_data_init(struct wl_info *wl)
 
57
{
 
58
        int rc;
 
59
        rc = wl_check_firmwares(wl);
 
60
 
 
61
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn0bsinitvals24,
 
62
                                             D11LCN0BSINITVALS24);
 
63
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn0initvals24,
 
64
                                             D11LCN0INITVALS24);
 
65
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn1bsinitvals24,
 
66
                                             D11LCN1BSINITVALS24);
 
67
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn1initvals24,
 
68
                                             D11LCN1INITVALS24);
 
69
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn2bsinitvals24,
 
70
                                             D11LCN2BSINITVALS24);
 
71
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn2initvals24,
 
72
                                             D11LCN2INITVALS24);
 
73
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11n0absinitvals16,
 
74
                                             D11N0ABSINITVALS16);
 
75
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11n0bsinitvals16,
 
76
                                             D11N0BSINITVALS16);
 
77
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11n0initvals16,
 
78
                                             D11N0INITVALS16);
 
79
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_16_mimo,
 
80
                                             D11UCODE_OVERSIGHT16_MIMO);
 
81
        rc = rc < 0 ? rc : wl_ucode_init_uint(wl, &bcm43xx_16_mimosz,
 
82
                                              D11UCODE_OVERSIGHT16_MIMOSZ);
 
83
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_24_lcn,
 
84
                                             D11UCODE_OVERSIGHT24_LCN);
 
85
        rc = rc < 0 ? rc : wl_ucode_init_uint(wl, &bcm43xx_24_lcnsz,
 
86
                                              D11UCODE_OVERSIGHT24_LCNSZ);
 
87
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_bommajor,
 
88
                                             D11UCODE_OVERSIGHT_BOMMAJOR);
 
89
        rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_bomminor,
 
90
                                             D11UCODE_OVERSIGHT_BOMMINOR);
 
91
        return rc;
 
92
}
 
93
 
 
94
void wl_ucode_data_free(void)
 
95
{
 
96
        wl_ucode_free_buf((void *)d11lcn0bsinitvals24);
 
97
        wl_ucode_free_buf((void *)d11lcn0initvals24);
 
98
        wl_ucode_free_buf((void *)d11lcn1bsinitvals24);
 
99
        wl_ucode_free_buf((void *)d11lcn1initvals24);
 
100
        wl_ucode_free_buf((void *)d11lcn2bsinitvals24);
 
101
        wl_ucode_free_buf((void *)d11lcn2initvals24);
 
102
        wl_ucode_free_buf((void *)d11n0absinitvals16);
 
103
        wl_ucode_free_buf((void *)d11n0bsinitvals16);
 
104
        wl_ucode_free_buf((void *)d11n0initvals16);
 
105
        wl_ucode_free_buf((void *)bcm43xx_16_mimo);
 
106
        wl_ucode_free_buf((void *)bcm43xx_24_lcn);
 
107
        wl_ucode_free_buf((void *)bcm43xx_bommajor);
 
108
        wl_ucode_free_buf((void *)bcm43xx_bomminor);
 
109
 
 
110
        return;
 
111
}