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

« back to all changes in this revision

Viewing changes to debian/patches/debian/dfsg/rtl8192u_usb-Remove-built-in-firmware.patch

  • 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
 
From 4babebe6977e46eed197cba18ce6ef073ddc1df5 Mon Sep 17 00:00:00 2001
2
 
From: Ben Hutchings <ben@decadent.org.uk>
3
 
Date: Fri, 18 Jun 2010 01:41:56 +0100
4
 
Subject: [PATCH] rtl8192u_usb: Remove built-in firmware images
5
 
 
6
 
They are already unused.
7
 
---
8
 
 drivers/staging/rtl8192u/r8192U.h              |    6 --
9
 
 drivers/staging/rtl8192u/r819xU_firmware.c     |   76 ++++++++----------------
10
 
 drivers/staging/rtl8192u/r819xU_firmware_img.c |    2 +
11
 
 drivers/staging/rtl8192u/r819xU_firmware_img.h |    7 --
12
 
 4 files changed, 27 insertions(+), 64 deletions(-)
13
 
 
14
 
diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
15
 
index 69a2721..e04fe7b 100644
16
 
--- a/drivers/staging/rtl8192u/r8192U.h
17
 
+++ b/drivers/staging/rtl8192u/r8192U.h
18
 
@@ -461,11 +461,6 @@ typedef enum _desc_packet_type_e{
19
 
        DESC_PACKET_TYPE_NORMAL = 1,
20
 
 }desc_packet_type_e;
21
 
 
22
 
-typedef enum _firmware_source{
23
 
-       FW_SOURCE_IMG_FILE = 0,
24
 
-       FW_SOURCE_HEADER_FILE = 1,              //from header file
25
 
-}firmware_source_e, *pfirmware_source_e;
26
 
-
27
 
 typedef enum _firmware_status{
28
 
        FW_STATUS_0_INIT = 0,
29
 
        FW_STATUS_1_MOVE_BOOT_CODE = 1,
30
 
@@ -1026,7 +1021,6 @@ typedef struct r8192_priv
31
 
        u8 Rf_Mode; //add for Firmware RF -R/W switch
32
 
        prt_firmware            pFirmware;
33
 
        rtl819xUsb_loopback_e   LoopbackMode;
34
 
-       firmware_source_e       firmware_source;
35
 
        u16 EEPROMTxPowerDiff;
36
 
        u8 EEPROMThermalMeter;
37
 
        u8 EEPROMPwDiff;
38
 
diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
39
 
index 3cc2d57..3b14d11 100644
40
 
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
41
 
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
42
 
@@ -244,13 +244,6 @@ bool init_firmware(struct net_device *dev)
43
 
        struct r8192_priv       *priv = ieee80211_priv(dev);
44
 
        bool                    rt_status = TRUE;
45
 
 
46
 
-       u8                      *firmware_img_buf[3] = { &rtl8190_fwboot_array[0],
47
 
-                                                        &rtl8190_fwmain_array[0],
48
 
-                                                        &rtl8190_fwdata_array[0]};
49
 
-
50
 
-       u32                     firmware_img_len[3] = { sizeof(rtl8190_fwboot_array),
51
 
-                                                       sizeof(rtl8190_fwmain_array),
52
 
-                                                       sizeof(rtl8190_fwdata_array)};
53
 
        u32                     file_length = 0;
54
 
        u8                      *mapped_file = NULL;
55
 
        u32                     init_step = 0;
56
 
@@ -284,59 +277,40 @@ bool init_firmware(struct net_device *dev)
57
 
         * Download boot, main, and data image for System reset.
58
 
         * Download data image for firmware reseta
59
 
         */
60
 
-       priv->firmware_source = FW_SOURCE_IMG_FILE;
61
 
        for(init_step = starting_state; init_step <= FW_INIT_STEP2_DATA; init_step++) {
62
 
                /*
63
 
                 * Open Image file, and map file to contineous memory if open file success.
64
 
                 * or read image file from array. Default load from IMG file
65
 
                 */
66
 
                if(rst_opt == OPT_SYSTEM_RESET) {
67
 
-                       switch(priv->firmware_source) {
68
 
-                               case FW_SOURCE_IMG_FILE:
69
 
-                                       rc = request_firmware(&fw_entry, fw_name[init_step],&priv->udev->dev);
70
 
-                                       if(rc < 0 ) {
71
 
-                                               RT_TRACE(COMP_ERR, "request firmware fail!\n");
72
 
-                                               goto download_firmware_fail;
73
 
-                                       }
74
 
-
75
 
-                                       if(fw_entry->size > sizeof(pfirmware->firmware_buf)) {
76
 
-                                               RT_TRACE(COMP_ERR, "img file size exceed the container buffer fail!\n");
77
 
-                                               goto download_firmware_fail;
78
 
-                                       }
79
 
-
80
 
-                                       if(init_step != FW_INIT_STEP1_MAIN) {
81
 
-                                               memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
82
 
-                                               mapped_file = pfirmware->firmware_buf;
83
 
-                                               file_length = fw_entry->size;
84
 
-                                       } else {
85
 
-                                       #ifdef RTL8190P
86
 
-                                               memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
87
 
-                                               mapped_file = pfirmware->firmware_buf;
88
 
-                                               file_length = fw_entry->size;
89
 
-                                       #else
90
 
-                                               memset(pfirmware->firmware_buf,0,128);
91
 
-                                               memcpy(&pfirmware->firmware_buf[128],fw_entry->data,fw_entry->size);
92
 
-                                               mapped_file = pfirmware->firmware_buf;
93
 
-                                               file_length = fw_entry->size + 128;
94
 
-                                       #endif
95
 
-                                       }
96
 
-                                       pfirmware->firmware_buf_size = file_length;
97
 
-                                       break;
98
 
-
99
 
-                               case FW_SOURCE_HEADER_FILE:
100
 
-                                       mapped_file =  firmware_img_buf[init_step];
101
 
-                                       file_length  = firmware_img_len[init_step];
102
 
-                                       if(init_step == FW_INIT_STEP2_DATA) {
103
 
-                                               memcpy(pfirmware->firmware_buf, mapped_file, file_length);
104
 
-                                               pfirmware->firmware_buf_size = file_length;
105
 
-                                       }
106
 
-                                       break;
107
 
-
108
 
-                               default:
109
 
-                                       break;
110
 
+                       rc = request_firmware(&fw_entry, fw_name[init_step],&priv->udev->dev);
111
 
+                       if(rc < 0 ) {
112
 
+                               RT_TRACE(COMP_ERR, "request firmware fail!\n");
113
 
+                               goto download_firmware_fail;
114
 
                        }
115
 
 
116
 
+                       if(fw_entry->size > sizeof(pfirmware->firmware_buf)) {
117
 
+                               RT_TRACE(COMP_ERR, "img file size exceed the container buffer fail!\n");
118
 
+                               goto download_firmware_fail;
119
 
+                       }
120
 
 
121
 
+                       if(init_step != FW_INIT_STEP1_MAIN) {
122
 
+                               memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
123
 
+                               mapped_file = pfirmware->firmware_buf;
124
 
+                               file_length = fw_entry->size;
125
 
+                       } else {
126
 
+#ifdef RTL8190P
127
 
+                               memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
128
 
+                               mapped_file = pfirmware->firmware_buf;
129
 
+                               file_length = fw_entry->size;
130
 
+#else
131
 
+                               memset(pfirmware->firmware_buf,0,128);
132
 
+                               memcpy(&pfirmware->firmware_buf[128],fw_entry->data,fw_entry->size);
133
 
+                               mapped_file = pfirmware->firmware_buf;
134
 
+                               file_length = fw_entry->size + 128;
135
 
+#endif
136
 
+                       }
137
 
+                       pfirmware->firmware_buf_size = file_length;
138
 
                }else if(rst_opt == OPT_FIRMWARE_RESET ) {
139
 
                        /* we only need to download data.img here */
140
 
                        mapped_file = pfirmware->firmware_buf;
141
 
diff --git a/drivers/staging/rtl8192u/r819xU_firmware_img.c b/drivers/staging/rtl8192u/r819xU_firmware_img.c
142
 
index 29b656d..7ab0bd5 100644
143
 
--- a/drivers/staging/rtl8192u/r819xU_firmware_img.c
144
 
+++ b/drivers/staging/rtl8192u/r819xU_firmware_img.c
145
 
@@ -1,6 +1,7 @@
146
 
 /*Created on  2008/ 7/16,  5:31*/
147
 
 #include <linux/types.h>
148
 
 
149
 
+#ifdef REMOVE_DFSG
150
 
 u8 rtl8190_fwboot_array[] = {
151
 
 0x10,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x3c,0x08,0xbf,0xc0,0x25,0x08,0x00,0x08,
152
 
 0x3c,0x09,0xb0,0x03,0xad,0x28,0x00,0x20,0x40,0x80,0x68,0x00,0x00,0x00,0x00,0x00,
153
 
@@ -2900,6 +2901,7 @@ u8 rtl8190_fwdata_array[] ={
154
 
 0x80,0x00,0x91,0x1c,0x80,0x00,0x91,0x30,0x80,0x00,0x91,0x38,0x80,0x00,0x91,0x40,
155
 
 0x80,0x00,0x91,0x40,0x80,0x00,0x91,0x40,0x80,0x00,0x91,0x40,0x80,0x00,0x90,0x60,
156
 
 0x80,0x00,0x91,0x70,0x80,0x00,0x91,0x84,0x80,0x00,0x8d,0x00,};
157
 
+#endif /* REMOVE_DFSG */
158
 
 
159
 
 u32 Rtl8192UsbPHY_REGArray[] = {
160
 
 0x0, };
161
 
diff --git a/drivers/staging/rtl8192u/r819xU_firmware_img.h b/drivers/staging/rtl8192u/r819xU_firmware_img.h
162
 
index d9d9515..18d0a6b 100644
163
 
--- a/drivers/staging/rtl8192u/r819xU_firmware_img.h
164
 
+++ b/drivers/staging/rtl8192u/r819xU_firmware_img.h
165
 
@@ -1,9 +1,6 @@
166
 
 #ifndef IMG_H
167
 
 #define IMG_H
168
 
 
169
 
-#define BOOT_ARR_LEN 344
170
 
-#define MAIN_ARR_LEN 45136
171
 
-#define DATA_ARR_LEN 796
172
 
 #define MACPHY_Array_PGLength 30
173
 
 #define PHY_REG_1T2RArrayLength 296
174
 
 #define AGCTAB_ArrayLength 384
175
 
@@ -16,10 +13,6 @@
176
 
 #define PHY_REGArrayLength 1
177
 
 
178
 
 
179
 
-extern u8 rtl8190_fwboot_array[BOOT_ARR_LEN];
180
 
-extern u8 rtl8190_fwmain_array[MAIN_ARR_LEN];
181
 
-extern u8 rtl8190_fwdata_array[DATA_ARR_LEN];
182
 
-
183
 
 extern u32 Rtl8192UsbPHY_REGArray[];
184
 
 extern u32 Rtl8192UsbPHY_REG_1T2RArray[];
185
 
 extern u32 Rtl8192UsbRadioA_Array[];
186
 
1.7.1
187