summaryrefslogtreecommitdiff
path: root/iwinfo_utils.c
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 /iwinfo_utils.c
parentb51449068871be04a8bfc1951a8488469e804b4e (diff)
downloadiwinfo-e9e14008fa5b1ded29dcfe507aa6dc232e8b9808.tar.gz
iwinfo: more Ralink and MediaTek WiSoC and PCIe chips
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'iwinfo_utils.c')
-rw-r--r--iwinfo_utils.c28
1 files changed, 24 insertions, 4 deletions
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];