iwinfo: add hardware description for QCA MIPS WiSoCs
authorDaniel Golle <daniel@makrotopia.org>
Wed, 6 Jan 2021 16:37:58 +0000 (16:37 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 6 Jan 2021 17:19:19 +0000 (17:19 +0000)
Add description strings and detection logic for all 6
types of WiFi NICs integrated in QCA MIPS WiSoCs.

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

index 07a249b9df09b4673f1f276319a69b5b7987a549..c2f9e66e7d83de0b85d93e40073459ccfacd7659 100644 (file)
 0x168c 0x002a 0x0777 0xe202   12      0  "Ubiquiti" "Bullet M2"
 0x168c 0x002a 0x0777 0xe805    5      0  "Ubiquiti" "Bullet M5"
 0x168c 0x002a 0x0777 0xe345    0      0  "Ubiquiti" "WispStation M5" /* ToDo: confirm offset - Wrong! */
+0x168c 0x0029 0x168c 0x9130    0      0  "Atheros"  "AR9130"
 0x168c 0x0029 0x168c 0xa094    0      0  "Atheros"  "AR9220"
 0x168c 0x0029 0x168c 0xa095    0      0  "Atheros"  "AR9223"
 0x168c 0x002a 0x168c 0xa093    0      0  "Atheros"  "AR9280"
 0x168c 0x002e 0x0777 0xe0a2    8      0  "Ubiquiti" "NanoStation Loco M2 (XM)" /* wrong offset! */
 0x168c 0x002e 0x168c 0x30a4    0      0  "Atheros"  "AR9287"
 0x168c 0x0030 0x168c 0x3114    0      0  "Atheros"  "AR9390"
+0x168c 0x0030 0x168c 0x9330    0      0  "Atheros"  "AR9330"
+0x168c 0x0030 0x168c 0x9340    0      0  "Atheros"  "AR9340"
+0x168c 0x0033 0x168c 0x9530    0      0  "Qualcomm Atheros"  "QCA9530"
+0x168c 0x0033 0x168c 0x9550    0      0  "Qualcomm Atheros"  "QCA9550"
+0x168c 0x0033 0x168c 0x9560    0      0  "Qualcomm Atheros"  "QCA9560"
 0x168c 0x0033 0x168c 0xa120    0      0  "Atheros"  "AR9580"
 0x168c 0x0033 0x168c 0xa136    0      0  "Atheros"  "AR9580"
 0x168c 0x0033 0x19b6 0xd014    0      0  "MikroTik" "R11e-5HnD"
index 5ca5c0374af508b81ba33bab5db3d4408a6df555..0a9421618617a87e5d0a3b91381cc7915c7c8b26 100644 (file)
@@ -3206,7 +3206,37 @@ static int nl80211_hardware_id_from_fdt(struct iwinfo_hardware_id *id, const cha
        if (nl80211_readstr(path, compat, sizeof(compat)) <= 0)
                return -1;
 
-       if (!strcmp(compat, "qcom,ipq4019-wifi")) {
+       if (!strcmp(compat, "qca,ar9130-wmac")) {
+               id->vendor_id = 0x168c;
+               id->device_id = 0x0029;
+               id->subsystem_vendor_id = 0x168c;
+               id->subsystem_device_id = 0x9130;
+       } else if (!strcmp(compat, "qca,ar9330-wmac")) {
+               id->vendor_id = 0x168c;
+               id->device_id = 0x0030;
+               id->subsystem_vendor_id = 0x168c;
+               id->subsystem_device_id = 0x9330;
+       } else if (!strcmp(compat, "qca,ar9340-wmac")) {
+               id->vendor_id = 0x168c;
+               id->device_id = 0x0030;
+               id->subsystem_vendor_id = 0x168c;
+               id->subsystem_device_id = 0x9340;
+       } else if (!strcmp(compat, "qca,qca9530-wmac")) {
+               id->vendor_id = 0x168c;
+               id->device_id = 0x0033;
+               id->subsystem_vendor_id = 0x168c;
+               id->subsystem_device_id = 0x9530;
+       } else if (!strcmp(compat, "qca,qca9550-wmac")) {
+               id->vendor_id = 0x168c;
+               id->device_id = 0x0033;
+               id->subsystem_vendor_id = 0x168c;
+               id->subsystem_device_id = 0x9550;
+       } else if (!strcmp(compat, "qca,qca9560-wmac")) {
+               id->vendor_id = 0x168c;
+               id->device_id = 0x0033;
+               id->subsystem_vendor_id = 0x168c;
+               id->subsystem_device_id = 0x9560;
+       } else if (!strcmp(compat, "qcom,ipq4019-wifi")) {
                id->vendor_id = 0x168c;
                id->device_id = 0x003c;
                id->subsystem_vendor_id = 0x168c;