[PATCH 3/4] utils: skip comment lines when parsing devices.txt
Just a small optimization, skip the line early if it starts with a #. Signed-off-by: Andre Heider --- iwinfo_utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iwinfo_utils.c b/iwinfo_utils.c index ecd1dff..d96cbb3 100644 --- a/iwinfo_utils.c +++ b/iwinfo_utils.c @@ -280,6 +280,9 @@ struct iwinfo_hardware_entry * iwinfo_hardware(struct iwinfo_hardware_id *id) while (fgets(buf, sizeof(buf) - 1, db) != NULL) { + if (buf[0] == '#') + continue; + memset(, 0, sizeof(e)); if (sscanf(buf, "%hx %hx %hx %hx %hd %hd \"%63[^\"]\" \"%63[^\"]\"", -- 2.39.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 4/4] devices: add USB devices supported by the mt76 driver
A nice and stable working mainline driver deserves first class support, and this adds all USB devices supported by it. The PIDs/VIDs are taken directly from the driver, in the very same order to make future syncs easy. The single left out entry is the unknown 148f:760a. Signed-off-by: Andre Heider --- devices.txt | 40 1 file changed, 40 insertions(+) diff --git a/devices.txt b/devices.txt index e316d60..82d8421 100644 --- a/devices.txt +++ b/devices.txt @@ -195,7 +195,47 @@ # USB devices # 0x | 0x | vendor id | product id | ... +# mt7921/usb.c 0x 0x 0x0e8d 0x79610 0 "MediaTek" "MT7921AU" +# mt76x2/usb.c +0x 0x 0x0b05 0x18330 0 "ASUS" "USB-AC54" +0x 0x 0x0b05 0x17eb0 0 "ASUS" "USB-AC55" +0x 0x 0x0b05 0x180b0 0 "ASUS" "USB-N53 B1" +0x 0x 0x0e8d 0x76120 0 "Aukey" "USBAC1200" /* Alfa AWUS036ACM */ +0x 0x 0x057c 0x85030 0 "AVM" "FRITZ!WLAN AC860" +0x 0x 0x7392 0xb7110 0 "Edimax" "EW-7722UAC" +0x 0x 0x0e8d 0x76320 0 "High Cloud" "HC-M7662BU1" +0x 0x 0x2c4e 0x01030 0 "Mercury" "UD13" +0x 0x 0x0846 0x90530 0 "Netgear" "A6210" +0x 0x 0x045e 0x02e60 0 "Microsoft" "XBox One Wireless Adapter" +0x 0x 0x045e 0x02fe0 0 "Microsoft" "XBox One Wireless Adapter" +# mt76x0/usb.c +0x 0x 0x148f 0x76100 0 "MediaTek" "MT7610U" +0x 0x 0x13b1 0x003e0 0 "Linksys" "AE6000" +0x 0x 0x0e8d 0x76100 0 "Sabrent" "NTWLAC" +0x 0x 0x7392 0xa7110 0 "Edimax" "7711MAC" +0x 0x 0x148f 0x761a0 0 "TP-Link" "TL-WDN5200" +0x 0x 0x0b05 0x17d10 0 "ASUS" "USB-AC51" +0x 0x 0x0b05 0x17db0 0 "ASUS" "USB-AC50" +0x 0x 0x0df6 0x00750 0 "Sitecom" "WLA-3100" +0x 0x 0x2019 0xab310 0 "Planex" "GW-450D" +0x 0x 0x2001 0x3d020 0 "D-Link" "DWA-171 rev B1" +0x 0x 0x0586 0x34250 0 "Zyxel" "NWD6505" +0x 0x 0x07b8 0x76100 0 "AboCom" "AU7212" +0x 0x 0x04bb 0x09510 0 "I-O DATA" "WN-AC433UK" +0x 0x 0x057c 0x85020 0 "AVM" "FRITZ!WLAN AC430" +0x 0x 0x293c 0x57020 0 "Comcast" "Xfinity KXW02AAA" +0x 0x 0x20f4 0x806b0 0 "TRENDnet" "TEW-806UBH" +0x 0x 0x7392 0xc7110 0 "Devolo" "WiFi Stick ac" +0x 0x 0x0df6 0x00790 0 "Sitecom" "WL-356" +0x 0x 0x2357 0x01230 0 "TP-Link" "T2UHP US v1" +0x 0x 0x2357 0x010b0 0 "TP-Link" "T2UHP UN v1" +0x 0x 0x2357 0x01050 0 "TP-Link" "Archer T1U" +0x 0x 0x0e8d 0x76300 0 "MediaTek" "MT7630U" +0x 0x 0x0e8d 0x76500 0 "MediaTek" "MT7650U" +# mt7615/usb.c +0x 0x 0x0e8d 0x76630 0 "MediaTek" "MT7663U" +0x 0x 0x043e 0x310c0 0 "LG" "LGSBWAC02" # FDT compatible strings # "compatible" | txpower offset | frequency offset | ... -- 2.39.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 1/4] devices: add MediaTek MT7628 card
This adds the single missing compatible supported by the mt76 driver, which is used by a bunch of ramips mt7628an devices. Signed-off-by: Andre Heider --- devices.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/devices.txt b/devices.txt index 4da663d..e316d60 100644 --- a/devices.txt +++ b/devices.txt @@ -208,4 +208,5 @@ "qcom,ipq4019-wifi" 0 0 "Qualcomm Atheros" "IPQ4019" "qcom,ipq8074-wifi" 0 0 "Qualcomm Atheros" "IPQ8074" "mediatek,mt7622-wmac" 0 0 "MediaTek" "MT7622" +"mediatek,mt7628-wmac" 0 0 "MediaTek" "MT7628" "mediatek,mt7986-wmac" 0 0 "MediaTek" "MT7986" -- 2.39.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 2/4] cli: describe USB devices as such
This makes it clear if the hardware is embedded or usb/pci based. Signed-off-by: Andre Heider --- iwinfo_cli.c | 4 1 file changed, 4 insertions(+) diff --git a/iwinfo_cli.c b/iwinfo_cli.c index f46772b..5dcee9a 100644 --- a/iwinfo_cli.c +++ b/iwinfo_cli.c @@ -367,6 +367,10 @@ static char * print_hardware_id(const struct iwinfo_ops *iw, const char *ifname) { if (strlen(ids.compatible) > 0) snprintf(buf, sizeof(buf), "embedded"); + else if (ids.vendor_id == 0 && ids.device_id == 0 && +ids.subsystem_vendor_id != 0 && ids.subsystem_device_id != 0) + snprintf(buf, sizeof(buf), "USB %04X:%04X", + ids.subsystem_vendor_id, ids.subsystem_device_id); else snprintf(buf, sizeof(buf), "%04X:%04X %04X:%04X", ids.vendor_id, ids.device_id, -- 2.39.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel