devices: add MediaTek MT7986 WiSoC
authorDaniel Golle <daniel@makrotopia.org>
Mon, 25 Jul 2022 02:17:44 +0000 (04:17 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 31 Aug 2022 13:08:39 +0000 (14:08 +0100)
Add detection of the MediaTek MT7986 WiSoC using the compatible string
from device tree.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
devices.txt
iwinfo_nl80211.c

index 876e72a86058f93e18ec88eaee5a9c3735c6ef9e..b01e4ac86583e2f74c108d29df9a48515541ac9f 100644 (file)
 0x14c3 0x7650 0x14c3 0x7650    0      0  "MediaTek" "MT7610E"
 0x14c3 0x7662 0x14c3 0x7662    0      0  "MediaTek" "MT76x2E"
 0x14c3 0x7915 0x14c3 0x7915    0      0  "MediaTek" "MT7915E"
+0x14c3 0x7986 0x14c3 0x7986    0      0  "MediaTek" "MT7986"
 0x14e4 0xaa52 0x14e4 0xaa52    0      0  "Broadcom" "BCM43602"
 0x02d0 0xa9a6 0x0000 0x0000    0      0  "Cypress"  "CYW43455"
 0x1ae9 0x0310 0x1ae9 0x0000    0      0  "Wilocity" "Wil6210"
index 30da6808168237bce86397eecae5aec3f606cfb1..d7fbd1e36c50ef98f8e4c4a108b51c3a6383c3a1 100644 (file)
@@ -3410,7 +3410,13 @@ static int nl80211_hardware_id_from_fdt(struct iwinfo_hardware_id *id, const cha
                id->device_id = 0x7622;
                id->subsystem_vendor_id = 0x14c3;
                id->subsystem_device_id = 0x7622;
+       } else if (!strcmp(compat, "mediatek,mt7986-wmac")) {
+               id->vendor_id = 0x14c3;
+               id->device_id = 0x7986;
+               id->subsystem_vendor_id = 0x14c3;
+               id->subsystem_device_id = 0x7986;
        }
+
        return (id->vendor_id && id->device_id) ? 0 : -1;
 }