iwinfo: add hardware description for QCA MIPS WiSoCs

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>
This commit is contained in:
Daniel Golle 2021-01-06 16:37:58 +00:00
parent 8bfd8d8800
commit 618c1e86f0
2 changed files with 37 additions and 1 deletions

View file

@ -141,6 +141,7 @@
0x168c 0x002a 0x0777 0xe202 12 0 "Ubiquiti" "Bullet M2" 0x168c 0x002a 0x0777 0xe202 12 0 "Ubiquiti" "Bullet M2"
0x168c 0x002a 0x0777 0xe805 5 0 "Ubiquiti" "Bullet M5" 0x168c 0x002a 0x0777 0xe805 5 0 "Ubiquiti" "Bullet M5"
0x168c 0x002a 0x0777 0xe345 0 0 "Ubiquiti" "WispStation M5" /* ToDo: confirm offset - Wrong! */ 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 0xa094 0 0 "Atheros" "AR9220"
0x168c 0x0029 0x168c 0xa095 0 0 "Atheros" "AR9223" 0x168c 0x0029 0x168c 0xa095 0 0 "Atheros" "AR9223"
0x168c 0x002a 0x168c 0xa093 0 0 "Atheros" "AR9280" 0x168c 0x002a 0x168c 0xa093 0 0 "Atheros" "AR9280"
@ -150,6 +151,11 @@
0x168c 0x002e 0x0777 0xe0a2 8 0 "Ubiquiti" "NanoStation Loco M2 (XM)" /* wrong offset! */ 0x168c 0x002e 0x0777 0xe0a2 8 0 "Ubiquiti" "NanoStation Loco M2 (XM)" /* wrong offset! */
0x168c 0x002e 0x168c 0x30a4 0 0 "Atheros" "AR9287" 0x168c 0x002e 0x168c 0x30a4 0 0 "Atheros" "AR9287"
0x168c 0x0030 0x168c 0x3114 0 0 "Atheros" "AR9390" 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 0xa120 0 0 "Atheros" "AR9580"
0x168c 0x0033 0x168c 0xa136 0 0 "Atheros" "AR9580" 0x168c 0x0033 0x168c 0xa136 0 0 "Atheros" "AR9580"
0x168c 0x0033 0x19b6 0xd014 0 0 "MikroTik" "R11e-5HnD" 0x168c 0x0033 0x19b6 0xd014 0 0 "MikroTik" "R11e-5HnD"

View 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) if (nl80211_readstr(path, compat, sizeof(compat)) <= 0)
return -1; 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->vendor_id = 0x168c;
id->device_id = 0x003c; id->device_id = 0x003c;
id->subsystem_vendor_id = 0x168c; id->subsystem_vendor_id = 0x168c;