forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/net/wireless/mediatek/mt7601u/usb.c
....@@ -1,14 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2015 Jakub Kicinski <kubakici@wp.pl>
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2
6
- * as published by the Free Software Foundation
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
124 */
135
146 #include <linux/kernel.h>
....@@ -34,6 +26,7 @@
3426 { USB_DEVICE(0x2717, 0x4106) },
3527 { USB_DEVICE(0x2955, 0x0001) },
3628 { USB_DEVICE(0x2955, 0x1001) },
29
+ { USB_DEVICE(0x2955, 0x1003) },
3730 { USB_DEVICE(0x2a5f, 0x1000) },
3831 { USB_DEVICE(0x7392, 0x7710) },
3932 { 0, }
....@@ -303,6 +296,10 @@
303296 mac_rev = mt7601u_rr(dev, MT_MAC_CSR0);
304297 dev_info(dev->dev, "ASIC revision: %08x MAC revision: %08x\n",
305298 asic_rev, mac_rev);
299
+ if ((asic_rev >> 16) != 0x7601) {
300
+ ret = -ENODEV;
301
+ goto err;
302
+ }
306303
307304 /* Note: vendor driver skips this check for MT7601U */
308305 if (!(mt7601u_rr(dev, MT_EFUSE_CTRL) & MT_EFUSE_CTRL_SEL))