All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Stefan Lippers-Hollmann <s.L-H@gmx.de>
Cc: wireless <linux-wireless@vger.kernel.org>
Subject: Re: Realtek rtl8188 support?
Date: Thu, 28 Oct 2010 17:10:06 -0500	[thread overview]
Message-ID: <4CC9F4BE.7070500@lwfinger.net> (raw)
In-Reply-To: <201010282348.16673.s.L-H@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

On 10/28/2010 04:48 PM, Stefan Lippers-Hollmann wrote:
> 
> I assume you refer to rtl8712u.bin in your r8712u_firmware tree:
> http://git.kernel.org/?p=linux/kernel/git/lwfinger/r8712u_firmware.git;a=blob_plain;f=rtl8712u.bin
> 200fd952db3cc9259b1fd05e3e51966f  *rtl8712u.bin
> 
>> you want to grab the new firmware package, I can send you a copy of the patch.
> 
> I'd very much like to test the patch(2) needed for rtl8712, if possible.

Attached is the patch. You should place rtl8712u.bin in
/lib/modules/rtl8712u/rtl8712u.bin.

Larry

[-- Attachment #2: 0001-staging-r8712u-Switch-driver-to-use-external-firmwar.patch --]
[-- Type: text/x-patch, Size: 2327 bytes --]

>From 2559d624a3bfc47e6ba9d1cf5157c5c7b1cbf80e Mon Sep 17 00:00:00 2001
From: Larry Finger <Larry.Finger@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@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@kroah.com>,
 Larry Finger <Larry.Finger@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


  reply	other threads:[~2010-10-28 22:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-06 17:45 Realtek rtl8188 support? Paul Thomas
2010-03-06 18:07 ` Gábor Stefanik
2010-03-07  8:16   ` Pavel Roskin
2010-03-07 15:36     ` Gábor Stefanik
2010-03-10  1:59       ` Pavel Roskin
2010-03-10  3:16       ` Pavel Roskin
2010-03-29 22:19         ` Paul Thomas
2010-03-29 23:32           ` Gábor Stefanik
2010-05-25  0:16           ` Paul Thomas
2010-05-25 23:00             ` Frederic Leroy
2010-05-26 22:06           ` Pavel Roskin
2010-05-26 22:21             ` Gábor Stefanik
2010-05-28 16:35               ` Pavel Roskin
2010-09-10 11:29         ` Claus Ried
2010-09-18  3:37           ` Hin-Tak Leung
2010-09-18 13:43             ` Stefan Lippers-Hollmann
     [not found]               ` <AANLkTimz6bR7mLnEgeBzBZrbKC+jp2bx3VTya=YL2KjV@mail.gmail.com>
     [not found]                 ` <201009212120.07914.s.L-H@gmx.de>
2010-10-28 18:26                   ` Larry Finger
2010-10-28 21:48                     ` Stefan Lippers-Hollmann
2010-10-28 22:10                       ` Larry Finger [this message]
2010-10-29 20:02                         ` Stefan Lippers-Hollmann
2010-10-29 20:03                           ` staging: r8712u: Fix external firmware loading Stefan Lippers-Hollmann
2010-10-29 20:26                           ` Realtek rtl8188 support? Walter Goldens
2010-10-29 21:27                             ` Gábor Stefanik
2010-10-30  4:06                               ` Larry Finger
2010-10-30 14:49                                 ` John W. Linville
2010-10-30 18:11                                   ` Gábor Stefanik
2010-10-31  3:44                                     ` Larry Finger
2010-10-31 11:30                                       ` Walter Goldens
2010-10-31 15:04                                         ` Larry Finger
2010-12-16 13:25                                           ` Walter Goldens
2010-12-16 14:10                                             ` Larry Finger
2011-01-25  7:57                                               ` Brian Prodoehl
2010-09-18 23:02             ` Paul Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CC9F4BE.7070500@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=s.L-H@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.