summaryrefslogtreecommitdiff
path: root/debian/patches/debian/dfsg
diff options
context:
space:
mode:
authorBen Hutchings <benh@debian.org>2010-06-18 00:57:45 +0000
committerBen Hutchings <benh@debian.org>2010-06-18 00:57:45 +0000
commit39f01da48865f66d4da955c77a4a19f91a336d20 (patch)
tree587c2960749c6a16fb2393fb2b2939cdb842d841 /debian/patches/debian/dfsg
parentb774aa7eecc8b67894dfa58470174ee7cf78b883 (diff)
downloaddebian-kernel-packaging-39f01da48865f66d4da955c77a4a19f91a336d20.tar.gz
[x86] Fix confusion between rtl8192u_usb and rtl8192s_usb drivers (Closes: #584945):
- Enable rtl8192u_usb driver - Fix and update device ID table in rtl8192s_usb driver svn path=/dists/trunk/linux-2.6/; revision=15882
Diffstat (limited to 'debian/patches/debian/dfsg')
-rw-r--r--debian/patches/debian/dfsg/files-12
-rw-r--r--debian/patches/debian/dfsg/rtl8192u_usb-Remove-built-in-firmware.patch188
-rw-r--r--debian/patches/debian/dfsg/rtl8192u_usb-Remove-code-for-using-built-in-firmware.patch168
3 files changed, 358 insertions, 0 deletions
diff --git a/debian/patches/debian/dfsg/files-1 b/debian/patches/debian/dfsg/files-1
index 79224a635..63990a80b 100644
--- a/debian/patches/debian/dfsg/files-1
+++ b/debian/patches/debian/dfsg/files-1
@@ -53,7 +53,9 @@ rm drivers/staging/otus/hal/hp*fw*.c*
# Next line should be removed for next upstream release/rc
rm drivers/staging/rtl8192su/r8192SU_HWImg.c
+# Switch to unifdef for next upstream release/rc
rm drivers/staging/rtl8192u/r819xU_firmware_img.c
+#unifdef drivers/staging/rtl8192u/r819xU_firmware_img.c -UREMOVE_DFSG
rm drivers/staging/vt6656/firmware.c
diff --git a/debian/patches/debian/dfsg/rtl8192u_usb-Remove-built-in-firmware.patch b/debian/patches/debian/dfsg/rtl8192u_usb-Remove-built-in-firmware.patch
new file mode 100644
index 000000000..bfb21df44
--- /dev/null
+++ b/debian/patches/debian/dfsg/rtl8192u_usb-Remove-built-in-firmware.patch
@@ -0,0 +1,188 @@
+From 4babebe6977e46eed197cba18ce6ef073ddc1df5 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Fri, 18 Jun 2010 01:41:56 +0100
+Subject: [PATCH] rtl8192u_usb: Remove built-in firmware images
+
+They are already unused.
+---
+ drivers/staging/rtl8192u/r8192U.h | 6 --
+ drivers/staging/rtl8192u/r819xU_firmware.c | 76 ++++++++----------------
+ drivers/staging/rtl8192u/r819xU_firmware_img.c | 2 +
+ drivers/staging/rtl8192u/r819xU_firmware_img.h | 7 --
+ 4 files changed, 27 insertions(+), 64 deletions(-)
+
+diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
+index 69a2721..e04fe7b 100644
+--- a/drivers/staging/rtl8192u/r8192U.h
++++ b/drivers/staging/rtl8192u/r8192U.h
+@@ -461,11 +461,6 @@ typedef enum _desc_packet_type_e{
+ DESC_PACKET_TYPE_NORMAL = 1,
+ }desc_packet_type_e;
+
+-typedef enum _firmware_source{
+- FW_SOURCE_IMG_FILE = 0,
+- FW_SOURCE_HEADER_FILE = 1, //from header file
+-}firmware_source_e, *pfirmware_source_e;
+-
+ typedef enum _firmware_status{
+ FW_STATUS_0_INIT = 0,
+ FW_STATUS_1_MOVE_BOOT_CODE = 1,
+@@ -1026,7 +1021,6 @@ typedef struct r8192_priv
+ u8 Rf_Mode; //add for Firmware RF -R/W switch
+ prt_firmware pFirmware;
+ rtl819xUsb_loopback_e LoopbackMode;
+- firmware_source_e firmware_source;
+ u16 EEPROMTxPowerDiff;
+ u8 EEPROMThermalMeter;
+ u8 EEPROMPwDiff;
+diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
+index 3cc2d57..3b14d11 100644
+--- a/drivers/staging/rtl8192u/r819xU_firmware.c
++++ b/drivers/staging/rtl8192u/r819xU_firmware.c
+@@ -244,13 +244,6 @@ bool init_firmware(struct net_device *dev)
+ struct r8192_priv *priv = ieee80211_priv(dev);
+ bool rt_status = TRUE;
+
+- u8 *firmware_img_buf[3] = { &rtl8190_fwboot_array[0],
+- &rtl8190_fwmain_array[0],
+- &rtl8190_fwdata_array[0]};
+-
+- u32 firmware_img_len[3] = { sizeof(rtl8190_fwboot_array),
+- sizeof(rtl8190_fwmain_array),
+- sizeof(rtl8190_fwdata_array)};
+ u32 file_length = 0;
+ u8 *mapped_file = NULL;
+ u32 init_step = 0;
+@@ -284,59 +277,40 @@ bool init_firmware(struct net_device *dev)
+ * Download boot, main, and data image for System reset.
+ * Download data image for firmware reseta
+ */
+- priv->firmware_source = FW_SOURCE_IMG_FILE;
+ for(init_step = starting_state; init_step <= FW_INIT_STEP2_DATA; init_step++) {
+ /*
+ * Open Image file, and map file to contineous memory if open file success.
+ * or read image file from array. Default load from IMG file
+ */
+ if(rst_opt == OPT_SYSTEM_RESET) {
+- switch(priv->firmware_source) {
+- case FW_SOURCE_IMG_FILE:
+- rc = request_firmware(&fw_entry, fw_name[init_step],&priv->udev->dev);
+- if(rc < 0 ) {
+- RT_TRACE(COMP_ERR, "request firmware fail!\n");
+- goto download_firmware_fail;
+- }
+-
+- if(fw_entry->size > sizeof(pfirmware->firmware_buf)) {
+- RT_TRACE(COMP_ERR, "img file size exceed the container buffer fail!\n");
+- goto download_firmware_fail;
+- }
+-
+- if(init_step != FW_INIT_STEP1_MAIN) {
+- memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
+- mapped_file = pfirmware->firmware_buf;
+- file_length = fw_entry->size;
+- } else {
+- #ifdef RTL8190P
+- memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
+- mapped_file = pfirmware->firmware_buf;
+- file_length = fw_entry->size;
+- #else
+- memset(pfirmware->firmware_buf,0,128);
+- memcpy(&pfirmware->firmware_buf[128],fw_entry->data,fw_entry->size);
+- mapped_file = pfirmware->firmware_buf;
+- file_length = fw_entry->size + 128;
+- #endif
+- }
+- pfirmware->firmware_buf_size = file_length;
+- break;
+-
+- case FW_SOURCE_HEADER_FILE:
+- mapped_file = firmware_img_buf[init_step];
+- file_length = firmware_img_len[init_step];
+- if(init_step == FW_INIT_STEP2_DATA) {
+- memcpy(pfirmware->firmware_buf, mapped_file, file_length);
+- pfirmware->firmware_buf_size = file_length;
+- }
+- break;
+-
+- default:
+- break;
++ rc = request_firmware(&fw_entry, fw_name[init_step],&priv->udev->dev);
++ if(rc < 0 ) {
++ RT_TRACE(COMP_ERR, "request firmware fail!\n");
++ goto download_firmware_fail;
+ }
+
++ if(fw_entry->size > sizeof(pfirmware->firmware_buf)) {
++ RT_TRACE(COMP_ERR, "img file size exceed the container buffer fail!\n");
++ goto download_firmware_fail;
++ }
+
++ if(init_step != FW_INIT_STEP1_MAIN) {
++ memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
++ mapped_file = pfirmware->firmware_buf;
++ file_length = fw_entry->size;
++ } else {
++#ifdef RTL8190P
++ memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
++ mapped_file = pfirmware->firmware_buf;
++ file_length = fw_entry->size;
++#else
++ memset(pfirmware->firmware_buf,0,128);
++ memcpy(&pfirmware->firmware_buf[128],fw_entry->data,fw_entry->size);
++ mapped_file = pfirmware->firmware_buf;
++ file_length = fw_entry->size + 128;
++#endif
++ }
++ pfirmware->firmware_buf_size = file_length;
+ }else if(rst_opt == OPT_FIRMWARE_RESET ) {
+ /* we only need to download data.img here */
+ mapped_file = pfirmware->firmware_buf;
+diff --git a/drivers/staging/rtl8192u/r819xU_firmware_img.c b/drivers/staging/rtl8192u/r819xU_firmware_img.c
+index 29b656d..7ab0bd5 100644
+--- a/drivers/staging/rtl8192u/r819xU_firmware_img.c
++++ b/drivers/staging/rtl8192u/r819xU_firmware_img.c
+@@ -1,6 +1,7 @@
+ /*Created on 2008/ 7/16, 5:31*/
+ #include <linux/types.h>
+
++#ifdef REMOVE_DFSG
+ u8 rtl8190_fwboot_array[] = {
+ 0x10,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x3c,0x08,0xbf,0xc0,0x25,0x08,0x00,0x08,
+ 0x3c,0x09,0xb0,0x03,0xad,0x28,0x00,0x20,0x40,0x80,0x68,0x00,0x00,0x00,0x00,0x00,
+@@ -2900,6 +2901,7 @@ u8 rtl8190_fwdata_array[] ={
+ 0x80,0x00,0x91,0x1c,0x80,0x00,0x91,0x30,0x80,0x00,0x91,0x38,0x80,0x00,0x91,0x40,
+ 0x80,0x00,0x91,0x40,0x80,0x00,0x91,0x40,0x80,0x00,0x91,0x40,0x80,0x00,0x90,0x60,
+ 0x80,0x00,0x91,0x70,0x80,0x00,0x91,0x84,0x80,0x00,0x8d,0x00,};
++#endif /* REMOVE_DFSG */
+
+ u32 Rtl8192UsbPHY_REGArray[] = {
+ 0x0, };
+diff --git a/drivers/staging/rtl8192u/r819xU_firmware_img.h b/drivers/staging/rtl8192u/r819xU_firmware_img.h
+index d9d9515..18d0a6b 100644
+--- a/drivers/staging/rtl8192u/r819xU_firmware_img.h
++++ b/drivers/staging/rtl8192u/r819xU_firmware_img.h
+@@ -1,9 +1,6 @@
+ #ifndef IMG_H
+ #define IMG_H
+
+-#define BOOT_ARR_LEN 344
+-#define MAIN_ARR_LEN 45136
+-#define DATA_ARR_LEN 796
+ #define MACPHY_Array_PGLength 30
+ #define PHY_REG_1T2RArrayLength 296
+ #define AGCTAB_ArrayLength 384
+@@ -16,10 +13,6 @@
+ #define PHY_REGArrayLength 1
+
+
+-extern u8 rtl8190_fwboot_array[BOOT_ARR_LEN];
+-extern u8 rtl8190_fwmain_array[MAIN_ARR_LEN];
+-extern u8 rtl8190_fwdata_array[DATA_ARR_LEN];
+-
+ extern u32 Rtl8192UsbPHY_REGArray[];
+ extern u32 Rtl8192UsbPHY_REG_1T2RArray[];
+ extern u32 Rtl8192UsbRadioA_Array[];
+--
+1.7.1
+
diff --git a/debian/patches/debian/dfsg/rtl8192u_usb-Remove-code-for-using-built-in-firmware.patch b/debian/patches/debian/dfsg/rtl8192u_usb-Remove-code-for-using-built-in-firmware.patch
new file mode 100644
index 000000000..c2b42e5a1
--- /dev/null
+++ b/debian/patches/debian/dfsg/rtl8192u_usb-Remove-code-for-using-built-in-firmware.patch
@@ -0,0 +1,168 @@
+From b1f1970ea2fb1788af17c8841a5bbf8a8c94c412 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Fri, 18 Jun 2010 01:41:56 +0100
+Subject: [PATCH 2/2] rtl8192u_usb: Remove code for using built-in firmware images
+
+This code is already unused and will fail to link since we removed
+the firmware images.
+---
+ drivers/staging/rtl8192u/r8192U.h | 6 --
+ drivers/staging/rtl8192u/r819xU_firmware.c | 76 ++++++++----------------
+ drivers/staging/rtl8192u/r819xU_firmware_img.h | 7 --
+ 3 files changed, 25 insertions(+), 64 deletions(-)
+
+diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
+index 69a2721..e04fe7b 100644
+--- a/drivers/staging/rtl8192u/r8192U.h
++++ b/drivers/staging/rtl8192u/r8192U.h
+@@ -461,11 +461,6 @@ typedef enum _desc_packet_type_e{
+ DESC_PACKET_TYPE_NORMAL = 1,
+ }desc_packet_type_e;
+
+-typedef enum _firmware_source{
+- FW_SOURCE_IMG_FILE = 0,
+- FW_SOURCE_HEADER_FILE = 1, //from header file
+-}firmware_source_e, *pfirmware_source_e;
+-
+ typedef enum _firmware_status{
+ FW_STATUS_0_INIT = 0,
+ FW_STATUS_1_MOVE_BOOT_CODE = 1,
+@@ -1026,7 +1021,6 @@ typedef struct r8192_priv
+ u8 Rf_Mode; //add for Firmware RF -R/W switch
+ prt_firmware pFirmware;
+ rtl819xUsb_loopback_e LoopbackMode;
+- firmware_source_e firmware_source;
+ u16 EEPROMTxPowerDiff;
+ u8 EEPROMThermalMeter;
+ u8 EEPROMPwDiff;
+diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
+index 3cc2d57..3b14d11 100644
+--- a/drivers/staging/rtl8192u/r819xU_firmware.c
++++ b/drivers/staging/rtl8192u/r819xU_firmware.c
+@@ -244,13 +244,6 @@ bool init_firmware(struct net_device *dev)
+ struct r8192_priv *priv = ieee80211_priv(dev);
+ bool rt_status = TRUE;
+
+- u8 *firmware_img_buf[3] = { &rtl8190_fwboot_array[0],
+- &rtl8190_fwmain_array[0],
+- &rtl8190_fwdata_array[0]};
+-
+- u32 firmware_img_len[3] = { sizeof(rtl8190_fwboot_array),
+- sizeof(rtl8190_fwmain_array),
+- sizeof(rtl8190_fwdata_array)};
+ u32 file_length = 0;
+ u8 *mapped_file = NULL;
+ u32 init_step = 0;
+@@ -284,59 +277,40 @@ bool init_firmware(struct net_device *dev)
+ * Download boot, main, and data image for System reset.
+ * Download data image for firmware reseta
+ */
+- priv->firmware_source = FW_SOURCE_IMG_FILE;
+ for(init_step = starting_state; init_step <= FW_INIT_STEP2_DATA; init_step++) {
+ /*
+ * Open Image file, and map file to contineous memory if open file success.
+ * or read image file from array. Default load from IMG file
+ */
+ if(rst_opt == OPT_SYSTEM_RESET) {
+- switch(priv->firmware_source) {
+- case FW_SOURCE_IMG_FILE:
+- rc = request_firmware(&fw_entry, fw_name[init_step],&priv->udev->dev);
+- if(rc < 0 ) {
+- RT_TRACE(COMP_ERR, "request firmware fail!\n");
+- goto download_firmware_fail;
+- }
+-
+- if(fw_entry->size > sizeof(pfirmware->firmware_buf)) {
+- RT_TRACE(COMP_ERR, "img file size exceed the container buffer fail!\n");
+- goto download_firmware_fail;
+- }
+-
+- if(init_step != FW_INIT_STEP1_MAIN) {
+- memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
+- mapped_file = pfirmware->firmware_buf;
+- file_length = fw_entry->size;
+- } else {
+- #ifdef RTL8190P
+- memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
+- mapped_file = pfirmware->firmware_buf;
+- file_length = fw_entry->size;
+- #else
+- memset(pfirmware->firmware_buf,0,128);
+- memcpy(&pfirmware->firmware_buf[128],fw_entry->data,fw_entry->size);
+- mapped_file = pfirmware->firmware_buf;
+- file_length = fw_entry->size + 128;
+- #endif
+- }
+- pfirmware->firmware_buf_size = file_length;
+- break;
+-
+- case FW_SOURCE_HEADER_FILE:
+- mapped_file = firmware_img_buf[init_step];
+- file_length = firmware_img_len[init_step];
+- if(init_step == FW_INIT_STEP2_DATA) {
+- memcpy(pfirmware->firmware_buf, mapped_file, file_length);
+- pfirmware->firmware_buf_size = file_length;
+- }
+- break;
+-
+- default:
+- break;
++ rc = request_firmware(&fw_entry, fw_name[init_step],&priv->udev->dev);
++ if(rc < 0 ) {
++ RT_TRACE(COMP_ERR, "request firmware fail!\n");
++ goto download_firmware_fail;
+ }
+
++ if(fw_entry->size > sizeof(pfirmware->firmware_buf)) {
++ RT_TRACE(COMP_ERR, "img file size exceed the container buffer fail!\n");
++ goto download_firmware_fail;
++ }
+
++ if(init_step != FW_INIT_STEP1_MAIN) {
++ memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
++ mapped_file = pfirmware->firmware_buf;
++ file_length = fw_entry->size;
++ } else {
++#ifdef RTL8190P
++ memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
++ mapped_file = pfirmware->firmware_buf;
++ file_length = fw_entry->size;
++#else
++ memset(pfirmware->firmware_buf,0,128);
++ memcpy(&pfirmware->firmware_buf[128],fw_entry->data,fw_entry->size);
++ mapped_file = pfirmware->firmware_buf;
++ file_length = fw_entry->size + 128;
++#endif
++ }
++ pfirmware->firmware_buf_size = file_length;
+ }else if(rst_opt == OPT_FIRMWARE_RESET ) {
+ /* we only need to download data.img here */
+ mapped_file = pfirmware->firmware_buf;
+diff --git a/drivers/staging/rtl8192u/r819xU_firmware_img.h b/drivers/staging/rtl8192u/r819xU_firmware_img.h
+index d9d9515..18d0a6b 100644
+--- a/drivers/staging/rtl8192u/r819xU_firmware_img.h
++++ b/drivers/staging/rtl8192u/r819xU_firmware_img.h
+@@ -1,9 +1,6 @@
+ #ifndef IMG_H
+ #define IMG_H
+
+-#define BOOT_ARR_LEN 344
+-#define MAIN_ARR_LEN 45136
+-#define DATA_ARR_LEN 796
+ #define MACPHY_Array_PGLength 30
+ #define PHY_REG_1T2RArrayLength 296
+ #define AGCTAB_ArrayLength 384
+@@ -16,10 +13,6 @@
+ #define PHY_REGArrayLength 1
+
+
+-extern u8 rtl8190_fwboot_array[BOOT_ARR_LEN];
+-extern u8 rtl8190_fwmain_array[MAIN_ARR_LEN];
+-extern u8 rtl8190_fwdata_array[DATA_ARR_LEN];
+-
+ extern u32 Rtl8192UsbPHY_REGArray[];
+ extern u32 Rtl8192UsbPHY_REG_1T2RArray[];
+ extern u32 Rtl8192UsbRadioA_Array[];
+--
+1.7.1
+