summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2019-03-01 12:10:58 +0100
committerDaniel Golle <daniel@makrotopia.org>2019-03-01 12:10:58 +0100
commite9e14008fa5b1ded29dcfe507aa6dc232e8b9808 (patch)
tree1981315632f49a1bf1775b64bd66cbd7ab917bb4
parentb51449068871be04a8bfc1951a8488469e804b4e (diff)
downloadiwinfo-e9e14008fa5b1ded29dcfe507aa6dc232e8b9808.tar.gz
iwinfo: more Ralink and MediaTek WiSoC and PCIe chips
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--hardware.txt9
-rw-r--r--iwinfo_utils.c28
2 files changed, 33 insertions, 4 deletions
diff --git a/hardware.txt b/hardware.txt
index 2b1a5d6..fa90b47 100644
--- a/hardware.txt
+++ b/hardware.txt
@@ -60,10 +60,19 @@
0x168c 0x003c 0x19b6 0xd03c 0 0 "Mikrotik" "R11e-5HacT"
0x168c 0x0046 0x168c 0xcafe 0 0 "Qualcomm Atheros" "QCA9984"
0x1814 0x3050 0x1814 0x0005 0 0 "RaLink" "Rt3050"
+0x1814 0x3051 0x1814 0x0007 0 0 "RaLink" "Rt3051"
0x1814 0x3052 0x1814 0x0008 0 0 "RaLink" "Rt3052"
+0x1814 0x3350 0x1814 0x000b 0 0 "RaLink" "Rt3350"
0x1814 0x3352 0x1814 0x000c 0 0 "RaLink" "Rt3352"
+0x1814 0x3662 0x1814 0x000d 0 0 "RaLink" "Rt3662"
+0x1814 0x3883 0x1814 0x000d 0 0 "RaLink" "Rt3883"
+0x1814 0x5350 0x1814 0x000f 0 0 "RaLink" "Rt5350"
0x11ab 0x2a55 0x11ab 0x0000 0 0 "Marvell" "88W8864"
0x02df 0x9135 0x0000 0x0000 0 0 "Marvell" "88W8887"
0x11ab 0x2b40 0x11ab 0x0000 0 0 "Marvell" "88W8964"
0x14c3 0x7603 0x14c3 0x7603 0 0 "MediaTek" "MT7603E"
+0x14c3 0x7610 0x14c3 0x7610 0 0 "MediaTek" "MT7610E"
+0x14c3 0x7620 0x14c3 0x000c 0 0 "MediaTek" "MT7620"
+0x14c3 0x7628 0x14c3 0x0004 0 0 "MediaTek" "MT76x8"
+0x14c3 0x7650 0x14c3 0x7650 0 0 "MediaTek" "MT7610E"
0x14c3 0x7662 0x14c3 0x7662 0 0 "MediaTek" "MT76x2E"
diff --git a/iwinfo_utils.c b/iwinfo_utils.c
index d024845..43e2eb7 100644
--- a/iwinfo_utils.c
+++ b/iwinfo_utils.c
@@ -237,17 +237,37 @@ int iwinfo_hardware_id_from_mtd(struct iwinfo_hardware_id *id)
}
/* Rt3xxx SoC */
- else if ((bc[off] == 0x3352) || (bc[off] == 0x5233) ||
+ else if ((bc[off] == 0x3050) || (bc[off] == 0x5030) ||
+ (bc[off] == 0x3051) || (bc[off] == 0x5130) ||
+ (bc[off] == 0x3052) || (bc[off] == 0x5230) ||
(bc[off] == 0x3350) || (bc[off] == 0x5033) ||
- (bc[off] == 0x3050) || (bc[off] == 0x5030) ||
- (bc[off] == 0x3052) || (bc[off] == 0x5230))
+ (bc[off] == 0x3352) || (bc[off] == 0x5233) ||
+ (bc[off] == 0x3662) || (bc[off] == 0x6236) ||
+ (bc[off] == 0x3883) || (bc[off] == 0x8338) ||
+ (bc[off] == 0x5350) || (bc[off] == 0x5053))
{
/* vendor: RaLink */
id->vendor_id = 0x1814;
id->subsystem_vendor_id = 0x1814;
/* device */
- if ((bc[off] & 0xf0) == 0x30)
+ if (((bc[off] & 0xf0) == 0x30) ||
+ ((bc[off] & 0xff) == 0x53))
+ id->device_id = (bc[off] >> 8) | (bc[off] & 0x00ff) << 8;
+ else
+ id->device_id = bc[off];
+
+ /* subsystem from EEPROM_NIC_CONF0_RF_TYPE */
+ id->subsystem_device_id = (bc[off + 0x1a] & 0x0f00) >> 8;
+ } else if ((bc[off] == 0x7620) || (bc[off] == 0x2076) ||
+ (bc[off] == 0x7628) || (bc[off] == 0x2876) ||
+ (bc[off] == 0x7688) || (bc[off] == 0x8876)) {
+ /* vendor: MediaTek */
+ id->vendor_id = 0x14c3;
+ id->subsystem_vendor_id = 0x14c3;
+
+ /* device */
+ if ((bc[off] & 0xff) == 0x76)
id->device_id = (bc[off] >> 8) | (bc[off] & 0x00ff) << 8;
else
id->device_id = bc[off];