summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-01-06 16:37:58 +0000
committerDaniel Golle <daniel@makrotopia.org>2021-01-06 17:19:19 +0000
commit618c1e86f039b815e3c6b79e91ea706a830716a0 (patch)
treef1517fcb24a113e731d3e7972675edfa21d0c1b1
parent8bfd8d88001e0d239d741c954c2421052b858fc1 (diff)
downloadiwinfo-618c1e86f039b815e3c6b79e91ea706a830716a0.tar.gz
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>
-rw-r--r--hardware.txt6
-rw-r--r--iwinfo_nl80211.c32
2 files changed, 37 insertions, 1 deletions
diff --git a/hardware.txt b/hardware.txt
index 07a249b..c2f9e66 100644
--- a/hardware.txt
+++ b/hardware.txt
@@ -141,6 +141,7 @@
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"
@@ -150,6 +151,11 @@
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"
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 5ca5c03..0a94216 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -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;