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

Commit 196e978c authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau
Browse files

mt76x0: remove unused usb header file



Remove unused usb header file and move mt76x0 firmware definition
in usb.c

Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 28041571
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -18,7 +18,6 @@
#include "eeprom.h"
#include "eeprom.h"
#include "trace.h"
#include "trace.h"
#include "mcu.h"
#include "mcu.h"
#include "usb.h"
#include "../mt76x02_util.h"
#include "../mt76x02_util.h"


#include "initvals.h"
#include "initvals.h"
+4 −3
Original line number Original line Diff line number Diff line
@@ -17,12 +17,13 @@
#include <linux/usb.h>
#include <linux/usb.h>


#include "mt76x0.h"
#include "mt76x0.h"
#include "usb.h"
#include "mcu.h"
#include "mcu.h"
#include "trace.h"
#include "trace.h"
#include "../mt76x02_util.h"
#include "../mt76x02_util.h"
#include "../mt76x02_usb.h"
#include "../mt76x02_usb.h"


#define MT7610U_FIRMWARE		"mediatek/mt7610u.bin"

static struct usb_device_id mt76x0_device_table[] = {
static struct usb_device_id mt76x0_device_table[] = {
	{ USB_DEVICE(0x148F, 0x7610) },	/* MT7610U */
	{ USB_DEVICE(0x148F, 0x7610) },	/* MT7610U */
	{ USB_DEVICE(0x13B1, 0x003E) },	/* Linksys AE6000 */
	{ USB_DEVICE(0x13B1, 0x003E) },	/* Linksys AE6000 */
@@ -126,7 +127,7 @@ static int mt76x0u_load_firmware(struct mt76x0_dev *dev)
	if (mt76x0_firmware_running(dev))
	if (mt76x0_firmware_running(dev))
		return 0;
		return 0;


	ret = request_firmware(&fw, MT7610_FIRMWARE, dev->mt76.dev);
	ret = request_firmware(&fw, MT7610U_FIRMWARE, dev->mt76.dev);
	if (ret)
	if (ret)
		return ret;
		return ret;


@@ -352,7 +353,7 @@ static int __maybe_unused mt76x0_resume(struct usb_interface *usb_intf)
}
}


MODULE_DEVICE_TABLE(usb, mt76x0_device_table);
MODULE_DEVICE_TABLE(usb, mt76x0_device_table);
MODULE_FIRMWARE(MT7610_FIRMWARE);
MODULE_FIRMWARE(MT7610U_FIRMWARE);
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");


static struct usb_driver mt76x0_driver = {
static struct usb_driver mt76x0_driver = {
+0 −46
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2015 Jakub Kicinski <kubakici@wp.pl>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 */

#ifndef __MT76X0U_USB_H
#define __MT76X0U_USB_H

#include "mt76x0.h"

#define MT7610_FIRMWARE	"mediatek/mt7610u.bin"

#define MT_VEND_REQ_MAX_RETRY	10
#define MT_VEND_REQ_TOUT_MS	300

#define MT_VEND_DEV_MODE_RESET	1

#define MT_VEND_BUF		sizeof(__le32)

static inline struct usb_device *mt76x0_to_usb_dev(struct mt76x0_dev *mt76x0)
{
	return interface_to_usbdev(to_usb_interface(mt76x0->mt76.dev));
}

static inline struct usb_device *mt76_to_usb_dev(struct mt76_dev *mt76)
{
	return interface_to_usbdev(to_usb_interface(mt76->dev));
}

static inline bool mt76x0_urb_has_error(struct urb *urb)
{
	return urb->status &&
		urb->status != -ENOENT &&
		urb->status != -ECONNRESET &&
		urb->status != -ESHUTDOWN;
}

#endif