Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31d5bbf3 authored by Ben Hutchings's avatar Ben Hutchings Committed by Greg Kroah-Hartman
Browse files

vt6656: Use request_firmware() to load firmware



The file added to linux-firmware is a copy of the current array which
does not have a recognisable header, so no validation is done.

Change the firmware version check to accept newer versions.

Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f1bc4343
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ config VT6656
	depends on USB && WLAN
	select WIRELESS_EXT
	select WEXT_PRIV
	select FW_LOADER
	---help---
	This is a vendor-written driver for VIA VT6656.
+3 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@
#include <linux/reboot.h>
#include <linux/usb.h>
#include <linux/signal.h>
#include <linux/firmware.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#ifdef SIOCETHTOOL
@@ -421,6 +422,8 @@ typedef struct __device_info {
    struct net_device*          dev;
    struct net_device_stats     stats;

    const struct firmware	*firmware;

    OPTIONS                     sOpts;

	struct tasklet_struct       CmdWorkItem;
+52 −753

File changed.

Preview size limit exceeded, changes collapsed.

+3 −0
Original line number Diff line number Diff line
@@ -1272,6 +1272,9 @@ static void __devexit vt6656_disconnect(struct usb_interface *intf)

	device_release_WPADEV(device);

	if (device->firmware)
		release_firmware(device->firmware);

	usb_set_intfdata(intf, NULL);
	usb_put_dev(interface_to_usbdev(intf));