Commit c84a7028 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman

staging: r8712u: Switch driver to use external firmware from linux-firmware

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e3dc896b
...@@ -3,8 +3,6 @@ TODO: ...@@ -3,8 +3,6 @@ TODO:
- switch to use LIB80211 - switch to use LIB80211
- switch to use MAC80211 - switch to use MAC80211
- checkpatch.pl fixes - only a few remain - checkpatch.pl fixes - only a few remain
- 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>, Please send any patches to Greg Kroah-Hartman <greg@kroah.com>,
Larry Finger <Larry.Finger@lwfinger.net> and Larry Finger <Larry.Finger@lwfinger.net> and
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "osdep_service.h" #include "osdep_service.h"
#include "drv_types.h" #include "drv_types.h"
#include "rtl871x_byteorder.h" #include "rtl871x_byteorder.h"
#include "farray.h"
#include "usb_osintf.h" #include "usb_osintf.h"
#define FWBUFF_ALIGN_SZ 512 #define FWBUFF_ALIGN_SZ 512
...@@ -40,11 +39,24 @@ ...@@ -40,11 +39,24 @@
static u32 rtl871x_open_fw(struct _adapter *padapter, void **pphfwfile_hdl, static u32 rtl871x_open_fw(struct _adapter *padapter, void **pphfwfile_hdl,
const u8 **ppmappedfw) 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; printk(KERN_INFO "r8712u: Loading firmware from \"%s\"\n",
len = sizeof(f_array); firmware_file);
return len; 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) static void fill_fwpriv(struct _adapter *padapter, struct fw_priv *pfwpriv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment