[kernel] r16757 - in dists/trunk/linux-2.6/debian: . config/kernelarch-x86 patches/features/all patches/series

Ben Hutchings benh at alioth.debian.org
Tue Jan 4 00:26:34 UTC 2011


Author: benh
Date: Tue Jan  4 00:26:32 2011
New Revision: 16757

Log:
[x86] Staging: Enable R8712U as module (r8712u, replacing r8192s_usb)

Added:
   dists/trunk/linux-2.6/debian/patches/features/all/r8712u-Fix-external-firmware-loading.patch
   dists/trunk/linux-2.6/debian/patches/features/all/r8712u-Switch-driver-to-use-external-firmware.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/config/kernelarch-x86/config
   dists/trunk/linux-2.6/debian/patches/series/base

Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	Mon Jan  3 23:51:19 2011	(r16756)
+++ dists/trunk/linux-2.6/debian/changelog	Tue Jan  4 00:26:32 2011	(r16757)
@@ -6,6 +6,8 @@
   * i2c-i801: Include <linux/slab.h> (fixes FTBFS on alpha)
   * starfire: Fix dma_addr_t size test for MIPS (fixes FTBFS)
   * watchdog: Improve failure message and documentation (Closes: #608138)
+  * [x86] Staging: Enable R8712U as module (r8712u, replacing r8192s_usb)
+    - Enable loading external firmware, thanks to Stefan Lippers-Hollmann
 
  -- Ben Hutchings <ben at decadent.org.uk>  Tue, 28 Dec 2010 03:15:05 +0000
 

Modified: dists/trunk/linux-2.6/debian/config/kernelarch-x86/config
==============================================================================
--- dists/trunk/linux-2.6/debian/config/kernelarch-x86/config	Mon Jan  3 23:51:19 2011	(r16756)
+++ dists/trunk/linux-2.6/debian/config/kernelarch-x86/config	Tue Jan  4 00:26:32 2011	(r16757)
@@ -1136,14 +1136,14 @@
 CONFIG_RTL8192E=m
 
 ##
-## file: drivers/staging/rtl8192su/Kconfig
+## file: drivers/staging/rtl8192u/Kconfig
 ##
-CONFIG_RTL8192SU=m
+CONFIG_RTL8192U=m
 
 ##
-## file: drivers/staging/rtl8192u/Kconfig
+## file: drivers/staging/rtl8712/Kconfig
 ##
-CONFIG_RTL8192U=m
+CONFIG_R8712U=m
 
 ##
 ## file: drivers/staging/samsung-laptop/Kconfig

Added: dists/trunk/linux-2.6/debian/patches/features/all/r8712u-Fix-external-firmware-loading.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/features/all/r8712u-Fix-external-firmware-loading.patch	Tue Jan  4 00:26:32 2011	(r16757)
@@ -0,0 +1,33 @@
+From: "Stefan Lippers-Hollmann" <s.L-H at gmx.de>
+Subject: staging: r8712u: Fix external firmware loading
+Date: Fri, 29 Oct 2010 22:03:36 +0200
+
+* select FW_LOADER
+* declare MODULE_FIRMWARE for r8712u
+
+Signed-off-by: Stefan Lippers-Hollmann <s.l-h at gmx.de>
+---
+ drivers/staging/rtl8712/Kconfig    |    1 +
+ drivers/staging/rtl8712/hal_init.c |    1 +
+ 2 files changed, 2 insertions(+)
+
+--- a/drivers/staging/rtl8712/Kconfig
++++ b/drivers/staging/rtl8712/Kconfig
+@@ -3,6 +3,7 @@ config R8712U
+ 	depends on WLAN && USB
+ 	select WIRELESS_EXT
+ 	select WEXT_PRIV
++	select FW_LOADER
+ 	default N
+ 	---help---
+ 	This option adds the Realtek RTL8712 USB device such as the D-Link DWA-130.
+--- a/drivers/staging/rtl8712/hal_init.c
++++ b/drivers/staging/rtl8712/hal_init.c
+@@ -58,6 +58,7 @@ static u32 rtl871x_open_fw(struct _adapt
+ 	*ppmappedfw = (u8 *)((*praw)->data);
+ 	return (*praw)->size;
+ }
++MODULE_FIRMWARE("rtl8712u/rtl8712u.bin");
+ 
+ static void fill_fwpriv(struct _adapter *padapter, struct fw_priv *pfwpriv)
+ {

Added: dists/trunk/linux-2.6/debian/patches/features/all/r8712u-Switch-driver-to-use-external-firmware.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/features/all/r8712u-Switch-driver-to-use-external-firmware.patch	Tue Jan  4 00:26:32 2011	(r16757)
@@ -0,0 +1,68 @@
+From: Larry Finger <Larry.Finger at lwfinger.net>
+Date: Tue, 26 Oct 2010 10:59:11 -0500
+Subject: [PATCH 1/2] staging: r8712u: Switch driver to use external firmware from linux-firmware
+
+Signed-off-by: Larry Finger <Larry.Finger at lwfinger.net>
+---
+ drivers/staging/rtl8712/TODO       |    2 --
+ drivers/staging/rtl8712/hal_init.c |   22 +++++++++++++++++-----
+ 2 files changed, 17 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/staging/rtl8712/TODO b/drivers/staging/rtl8712/TODO
+index 5c88821..ed22b0b 100644
+--- a/drivers/staging/rtl8712/TODO
++++ b/drivers/staging/rtl8712/TODO
+@@ -4,8 +4,6 @@ TODO:
+ - switch to use MAC80211
+ - checkpatch.pl fixes - only a few remain
+ - sparse fixes
+-- switch from large inline firmware file to use the firmware interface
+-  and add the file to the linux-firmware package.
+ 
+ Please send any patches to Greg Kroah-Hartman <greg at kroah.com>,
+ Larry Finger <Larry.Finger at lwfinger.net> and
+diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
+index 32088a6..014fbbc 100644
+--- a/drivers/staging/rtl8712/hal_init.c
++++ b/drivers/staging/rtl8712/hal_init.c
+@@ -31,7 +31,6 @@
+ #include "osdep_service.h"
+ #include "drv_types.h"
+ #include "rtl871x_byteorder.h"
+-#include "farray.h"
+ #include "usb_osintf.h"
+ 
+ #define FWBUFF_ALIGN_SZ 512
+@@ -40,11 +39,24 @@
+ static u32 rtl871x_open_fw(struct _adapter *padapter, void **pphfwfile_hdl,
+ 		    const u8 **ppmappedfw)
+ {
+-	u32 len;
++	int rc;
++	const char firmware_file[] = "rtl8712u/rtl8712u.bin";
++	const struct firmware **praw = (const struct firmware **)
++				       (pphfwfile_hdl);
++	struct dvobj_priv *pdvobjpriv = (struct dvobj_priv *)
++					(&padapter->dvobjpriv);
++	struct usb_device *pusbdev = pdvobjpriv->pusbdev;
+ 
+-	*ppmappedfw = f_array;
+-	len = sizeof(f_array);
+-	return len;
++	printk(KERN_INFO "r8712u: Loading firmware from \"%s\"\n",
++	       firmware_file);
++	rc = request_firmware(praw, firmware_file, &pusbdev->dev);
++	if (rc < 0) {
++		printk(KERN_ERR "r8712u: Unable to load firmware\n");
++		printk(KERN_ERR "r8712u: Install latest linux-firmware\n");
++		return 0;
++	}
++	*ppmappedfw = (u8 *)((*praw)->data);
++	return (*praw)->size;
+ }
+ 
+ static void fill_fwpriv(struct _adapter *padapter, struct fw_priv *pfwpriv)
+-- 
+1.7.1
+
+

Modified: dists/trunk/linux-2.6/debian/patches/series/base
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/base	Mon Jan  3 23:51:19 2011	(r16756)
+++ dists/trunk/linux-2.6/debian/patches/series/base	Tue Jan  4 00:26:32 2011	(r16757)
@@ -47,3 +47,5 @@
 + bugfix/all/i2c-i801-Include-linux-slab.h.patch
 + bugfix/mips/starfire-Fix-dma_addr_t-size-test-for-MIPS.patch
 + features/all/watchdog-Improve-failure-message-and-documentation.patch
++ features/all/r8712u-Switch-driver-to-use-external-firmware.patch
++ features/all/r8712u-Fix-external-firmware-loading.patch



More information about the Kernel-svn-changes mailing list