diff options
author | Jo-Philipp Wich <jo@mein.io> | 2023-01-09 20:49:53 +0100 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-01-10 00:26:50 +0100 |
commit | fac0787ab007243d7dc51948bd06eceea7299bba (patch) | |
tree | 7b4c73010e1cfc1a17f90bcedf8acfabdc1ce04f /include | |
parent | c7b420a2f33c6f1034c3e2191eba0cb0374af7b6 (diff) | |
download | iwinfo-fac0787ab007243d7dc51948bd06eceea7299bba.tar.gz |
devices: add support for declaring compatible matched devices
Some device have embedded wifi card that are not connected with usb or
internall with pci. Such device have fake device_id and only the
vendor_id actually reflect something real but internally they don't have
any id and are just matched by the node compatible binding in DT.
We currently match this with a big if-else to match the single devices
but this can be improved and be matched directly in devices.txt
Rework this so that we can drop the big if-else and move the matching
to devices.txt
When a device is matched using compatible in iwinfo the hardware will be
flagged as embedded and won't print empty ids.
Update devices.txt by migrating all the compatible matching device from
fake id to compatible matching.
Tested-by: Christian Marangi <ansuelsmth@gmail.com> # ipq4019
Co-developed-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Robert Marko <robimarko@gmail.com> # ipq8074
Reviewed-by: Andre Heider <a.heider@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/iwinfo.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/iwinfo.h b/include/iwinfo.h index e87ad18..4b63f1e 100644 --- a/include/iwinfo.h +++ b/include/iwinfo.h @@ -243,6 +243,7 @@ struct iwinfo_hardware_id { uint16_t device_id; uint16_t subsystem_vendor_id; uint16_t subsystem_device_id; + char compatible[128]; }; struct iwinfo_hardware_entry { @@ -254,6 +255,7 @@ struct iwinfo_hardware_entry { uint16_t subsystem_device_id; int16_t txpower_offset; int16_t frequency_offset; + char compatible[128]; }; extern const struct iwinfo_iso3166_label IWINFO_ISO3166_NAMES[]; |