iwinfo: more Ralink and MediaTek WiSoC and PCIe chips
authorDaniel Golle <daniel@makrotopia.org>
Fri, 1 Mar 2019 11:10:58 +0000 (12:10 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 1 Mar 2019 11:10:58 +0000 (12:10 +0100)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
hardware.txt
iwinfo_utils.c

index 2b1a5d64929267e97e21c89b64a1300dfa3823f3..fa90b47b78180efedfa92d0081aab7a85459a232 100644 (file)
 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"
index d02484501bdef5424bc6f3d028b90a03ce3d9640..43e2eb78c80ad9dd92084e8afacdc0da62b365d3 100644 (file)
@@ -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];